Features of Entity Framework 6

Entity framework team making lots of changes and improvements in each and every version of entity framework. The following are the few features which feel better. lets have look on it
  • Async  Query and Save.
  • Connection Resiliency.
  • Dependency Resolution.
  • Improved Transaction Support.
  • DbSet.AddRange/Remove Range.
  • DbChangeTracker.HasChanges.
  • Custom Code First Conventions.
  • Multiple Contexts per Database.
  • CRUD Store procedure Support.
Let us look brief about them 

 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.

 Connection Resiliency

Enables automatic recovery from transient connection failures, means EF has ability to automatically retry any commands that fail due to these connection breaks.

Dependency Resolution

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.

DbSet.AddRange/Remove Range

Provides an optimized way to add or remove multiple entities from a set.

DbChangeTracker.HasChanges

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.

Summary

I hope this article is useful for all readers. If you have any suggestion then please contact me.

 

Post a Comment

www.CodeNirvana.in

Protected by Copyscape
Copyright © Compilemode