If you want to get the list of modified objects in Entity Framework, you can do using the below mentioned code.
Please Like and Share the Blog, if you find it interesting and helpful.
List<object> newlyAddedOrModifiedEntities = context.ChangeTracker.Entries().Where(x => x.State == System.Data.EntryState.Modified || x.State == System.Data.EntryState.Added).Select(a=>a.Entity).ToList();
Please Like and Share the Blog, if you find it interesting and helpful.
No comments:
Post a Comment