AddOrUpdate and Merge.

Jun 1, 2014 at 8:56 PM
Hi, Is there any one that has implemented this Entity Framework goodness into this framework?
or are they already include and I don't know how to use them?

I use AddOrUpdate in my seed Method, is quite useful; and i would like to use Merge too, just passing the new Modified Entity and let Entity Framework update the Persisted Entity, if this isn't a bad practice of course.

Many thanks in advance.
Jun 3, 2014 at 7:01 PM
Jun 3, 2014 at 10:05 PM
Hi Le Long, and thanks to answer the question, but I don't get it, as far as I can tell, you are suggesting to add a Merge Method to every custom query (maybe one by each entity or aggregate i need for).
please advise if I'm wrong.

What I was trying to ask is do this function can be added to the GenerecicRepository?.
Thanks a lot for taking your time to answer, and I hope I not making you wasting your time asking again. Thank you.
Jul 3, 2014 at 5:49 PM
The framework is built to be easily extensible, you could simply add this method and it's implementation to IRepository and Repsitory.cs and all your repositories would have them.
Marked as answer by lelong37 on 7/3/2014 at 9:49 AM