Entity Framework 5.0: Spatial Data Types, Performance Enhancements, Database Improvements
Entity Framework 5.0 provides support for spatial data types and can be implemented using DbGeography and DbGeometry classes. It also introduces automatic compilation of LINQ to Entities queries by translating inline LINQ queries in a cached mode. Hence, developers need not have to make use of CompiledQuery.Compile method as in previous versions.
According to Entity Framework team at Microsoft, LINQ to Entities queries has improved the performance of applications by nearly 600% when compared with Entity Framework 4.0.
Entity Framework 5.0 automatically detects the database engine depending upon the development environment for the creation of new databases including the ability to make use of enum properties in entity classes. The framework also adds tables to the existing database if the target database doesn't contain any tables from the model.
The Entity Framework designer included with Visual Studio 2012 consist of new features such as DbContext code generation, multiple-diagrams per model, table-valued functions in addition to batch import of stored procedures which allows multiple stored procedures to be added during model creation. The new models created using the designer will generate a derived DbContext and POCO classes by default.
Dmytro Svarytsevych Oct 30, 2014