Reputation: 16310
I have a WebApi2 project with EF6 CodeFirst. I'm also using AutoMapper to map between my models and dto's. I'm not using OData.
I'm trying to find a solution to handle updates of entities. As I'm not using OData I can't use Delta and I would not like to use JsonPatch.
In my scenario:
My problem lies with 3.
Can I use GraphDiff for patching entities? (I will also be using GraphDiff was updating complex graphs). And if I can use GraphDiff, will EF change tracking kick in automatically?
Upvotes: 2
Views: 422
Reputation: 16310
In the above-mentioned scenario:
As for (3):
GraphDiff does not do a per-property patch. It updates the whole object by traversing it and build a diff and then it merges the changes. As the loaded graph is tracked by EF, it is then EF's task to send the correct SQL statements.
Upvotes: 2