Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ValueTracker GetChangedPropertyList<T>(ChangeTracker changeTracker)
- {
- var changedPropList =
- changeTracker.Entries().Where(entry =>
- entry.Entity.GetType() == typeof(T)).SelectMany(entry => entry.Properties)
- .Where(entry => entry.IsModified).Select(entry =>
- new ValueTrackerItem(entry.Metadata.Name, entry.OriginalValue, entry.CurrentValue));
- return new ValueTracker {Changes = changedPropList.ToList()};
- }
Add Comment
Please, Sign In to add comment