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.
Loading...
Related Quiz
- To apply migrations at runtime, the ________ method is used in Entity Framework.
- To optimize queries in TPT inheritance, developers often need to address the issue of ________ due to multiple table joins.
- How does index fragmentation affect performance in Entity Framework?
- Which aggregate function in Entity Framework is used to find the sum of a numeric column?
- Which version of Entity Framework first introduced the Code-First approach?