1
Answer

Get Changes of Related Entities In EF6 with Repository

Mahmoud Ali

Mahmoud Ali

9y
1k
1

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)