- Async Query and Save.
- Connection Resiliency.
- Dependency Resolution.
- Improved Transaction Support.
- DbSet.AddRange/Remove Range.
- Custom Code First Conventions.
- Multiple Contexts per Database.
- CRUD Store procedure Support.
Async Query and Save
EF6 introduced support for asynchronous query and save using the async and await keywords that were introduced in .NET 4.5. Async programming is primarily focused on freeing up the current managed thread to do other work while it waits for an operation that does not require any compute time from a managed thread.
Enables automatic recovery from transient connection failures, means EF has ability to automatically retry any commands that fail due to these connection breaks.
Introduces support for the dependency resolution using IDbDependencyResolver Services.
Improved Transaction Support
In all versions of Entity Framework, whenever you execute SaveChanges() to insert, update or delete on the database the framework will wrap that operation in a transaction. This transaction lasts only long enough to execute the operation and then completes. When you execute another such operation a new transaction is started.
Provides an optimized way to add or remove multiple entities from a set.
Provides an easy and efficient way to see if there are any pending changes to be saved to the database.
Custom Code First Conventions
Allow write your own conventions for auto generated code to avoid repetitive configuration.
Multiple Contexts per Database
Removed the previous limitation of one Code First model per database when using Migrations or when Code First automatically created the database for you.
CRUD Store procedure Support
By default, Code First will configure all entities to perform insert, update and delete commands using direct table access. Starting in EF6 you can configure your Code First model to use stored procedures for some or all entities in your model.
I hope this article is useful for all readers. If you have any suggestion then please contact me.