Mahmoud Ali

Mahmoud Ali

  • NA
  • 32
  • 4.4k

Get Changes of Related Entities In EF6 with Repository

Aug 18 2015 11:24 AM

Hello. I am using EF V.6 With MVC5 Project with repository pattern. My issue that data updated or changed in SQL Server but the related entities in the Context not updated and caching the old value.

I have tried to get the changeTracker into the Unitofwork. but nothing happen.

 foreach (var entity in _context.ChangeTracker.Entries()) { entity.Reload(); }


How can i get the changed of the related entities. ?

Thanks.


Answers (1)