zzzprojects / GraphDiff

GraphDiff is a library that allows the automatic update of a detached graph using Entity Framework code first.
https://entityframework-graphdiff.net/overview
MIT License
333 stars 101 forks source link

Id of new entity is not getting populated after call to SaveChanges() #144

Closed kevinrood closed 9 years ago

kevinrood commented 9 years ago

This is the Id of the root entity.

I understand this is clearly a supported scenario. Is there anything in the mapping, or other settings, which could contribute to this?

ScarlettCode commented 9 years ago

You need to set the return of UpdateGraph to your entity, GraphDiff hands you a new instance, it doesn't update the existing one.

qualification = db.UpdateGraph(qualification);

kevinrood commented 9 years ago

@ScarlettCode thank you