I need to get the list of changed fields only, the datastore is ssce so no triggers are available
Is there any support in EF to get a list or to build a generic component ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depending on the type of context and generated entities you can do it in several different ways.
In case of objects inherited from Entity or POCO you can use
ObjectStateManagerin case of Self-Tracking entities you can use Tracker from entity itself.
please provide more details on the way how you generated context and how you make changes
EDITED(2):
you can query
ObjectStateManagerfor changed entries simply like this:EDITED(1):
The following example from MSDN demonstrate how to query for changes: