In a disconnected scenario, the ________ method of DbSet is used to update an existing entity.

  • Attach
  • Modify
  • Refresh
  • Update
The correct method is Attach. In a disconnected scenario, when you have an entity that was not originally tracked by the context, you use the Attach method to attach it to the context so that any changes made to it can be persisted back to the database.
Add your answer
Loading...

Leave a comment

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