Quantcast
Channel: Entity Framework – Web Development Tutorial
Viewing all articles
Browse latest Browse all 15

What’s new in Entity Framework from beginning to EF 6

$
0
0

Microsoft Entity Framework (EF) is an Object Relational Mapping framework that provides an abstraction layer (a kind of mapping) between two incompatible systems (i.e. Object oriented programming languages with Relational databases). It enables us to interact with relational data in an object oriented way.

Let’s have a quick look into most important and exciting new features introduced in different versions of Microsoft Entity Framework.Entity Framework 6

First version of Entity Framework was introduced with .NET Framework v3.5 Service Pack 1. Basic Object Relational Mapping support was given in this version.

New Features in Entity Framework 4

Entity Framework 4 was actually second version but named as EF 4 to align with .NET Framework v4.0 and Visual Studio 2010 having the following new features including all major and minor versions of Entity Framework i.e. 4, 4.1, 4.1.1, 4.2, 4.3 and 4.3.1.

  • Support for POCO – Plain Old CLR Objects that decouples it from any persistence technology.
  • Lazy Loading – On demand loading of related entities.
  • Code Generation – Customizable code generation templates.
  • Support for Model First Development – We first create model of entities and later on generate script for corresponding database tables and relations using Visual Studio 2010.
  • DbContext API provides simplified abstraction over ObjectContext.
  • Code First Development – Conceptual model can be created by writing classes.
  • Code First Migration facilitates incremental migration of database created by code first development.

New Features in Entity Framework 5

Entity Framework 5 targets both .NET 4 as well as .NET framework 4.5 with following new features.

  • Enum Support – enum properties supported in entity classes with EF5.
  • Spatial Data Types – support for working with Spatial data using DbGeography and DbGeometry classes.
  • Support for Table-Valued functions of SQL Server that are just like stored procedures with one key difference and that difference is TVF result can be used in a LINQ query.
  • Performance Enhancements – around 65% to 70% performance improvment over Entity Framework 4.

New Features in Entity Framework 6

This version of Entity Framework is available with Visual Studio 2013 but we can download EF 6 for Visual Studio 2012 too.

  • Code-based configuration support along with traditional XML-based configuration support.
  • Most exciting feature of Entity Framework 6 is asynchronous support i.e support for asynchronous queries and save. Asynchronous feature is introduced in .NET 4.5. WCF 4.5 also supports asynchronous programming.
  • Logging Enhancements – logging of database commands helps to understand what’s going on while interacting with data.
  • Support for stored procedure mapping to different operations like insert, update, delete.
  • Testability Improvements.
  • Custom Code First Conventions helps to customize default conventions.

The post discussed key and interesting new features of Entity Framework but for a complete list of new features and enhancements about this technology, please visit Microsoft  Entity Framework Documentation.

Other Related Articles:

Top 10 Interview Questions and Answers Series:

The post What’s new in Entity Framework from beginning to EF 6 appeared first on Web Development Tutorial.


Viewing all articles
Browse latest Browse all 15

Trending Articles