Which method in Entity Framework Core is primarily used for tracking changes made to an entity?

  • Update
  • Add
  • Attach
  • Remove
The Attach method in Entity Framework Core is primarily used for tracking changes made to an entity. When you attach an entity, EF Core starts tracking it, and any changes made to that entity will be detected and persisted when you call SaveChanges. This is especially useful when you want to work with entities that have been detached from the context.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *