When updating multiple records asynchronously, it is recommended to use ________ to batch operations efficiently.
- DbContext.BulkUpdate()
- DbContext.SaveChanges()
- DbContext.SaveChangesAsync()
- SaveChangesOptions.Batch
The correct answer is DbContext.SaveChangesAsync(). This method asynchronously saves all changes made in this context to the underlying database.
Loading...
Related Quiz
- In advanced inheritance scenarios, the ________ method is used to configure specific mappings between an entity and a database table.
- In Entity Framework, how can you specify an index to be unique?
- When dealing with a large-scale application that has performance issues due to database queries, what steps would you take to analyze and optimize indexes?
- In a scenario where a model's state is validated at various points, what mechanisms does Entity Framework provide for revalidating the model?
- In Entity Framework, how is caching affected when using raw SQL queries?