-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement missing APIs from ChangeTacker/Entry #2295
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-enhancement
Milestone
Comments
This was referenced May 29, 2015
👍 I think I need Reload, too |
+1 for Reload |
ajcvickers
added a commit
that referenced
this issue
Aug 19, 2016
Likewise for members, navigations, references, collections. Issues #2295 and #2245 The issue here is that it is quite common to want to do something for all property entries for a given entity. In the question asked by the customer this was to get the modified state. This was always possible but required two steps: - Use metadata APIs to find all the Properties - Loop/query over this metadata getting entries So Rowan's code looked liked this: ```C# var entry = context.Entry(myEntity); var propertyNames = entry.Metadata.GetProperties().Select(p => p.Name); var modifiedEntries = propertyNames.Select(p => entry.Property(p)).Where(e => e.IsModified); ``` With these new APIs the metadata and entry steps are combined for you so you would now write this: ```C# var modifiedEntries = context.Entry(myEntity).Properties.Where(e => e.IsModified); ```
ajcvickers
added a commit
that referenced
this issue
Aug 22, 2016
Likewise for members, navigations, references, collections. Issues #2295 and #2245 The issue here is that it is quite common to want to do something for all property entries for a given entity. In the question asked by the customer this was to get the modified state. This was always possible but required two steps: - Use metadata APIs to find all the Properties - Loop/query over this metadata getting entries So Rowan's code looked liked this: ```C# var entry = context.Entry(myEntity); var propertyNames = entry.Metadata.GetProperties().Select(p => p.Name); var modifiedEntries = propertyNames.Select(p => entry.Property(p)).Where(e => e.IsModified); ``` With these new APIs the metadata and entry steps are combined for you so you would now write this: ```C# var modifiedEntries = context.Entry(myEntity).Properties.Where(e => e.IsModified); ```
GetModifiedProperties issue resolved with commit above. Reload is being tracked by #1203 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-enhancement
We do not have all APIs that we historically had available:
The text was updated successfully, but these errors were encountered: