Here I list the new features of Entity Framework 5.0 RC:
- New Data Type Support with Entity classes
Entity Framework 5.0 RC supports many new data types with entity classes:
- Spatial Data Type (Geography and Geometry) you can expose in model using DbGeography and DbGeometry types. Spatial data is supported in Model, Database and Code First. http://msdn.microsoft.com/en-us/hh859576
- EF 5.0 has the ability to work with the Table Value Function. In this version the Table value function is street similar to a stored procedure, but the result of the Table Value Function is composable; in other words you can use it with a LINQ query. See http://msdn.microsoft.com/en-us/hh859577
- All LINQ queries are now automatically compiled and cached to improve query performance. In previous versions we could use a Compiled Query to do that.
- Multiple Diagrams for a model is supported with EF 5.0. It is also allows you to visualize subsections of your overall model. This diagram shows entities and their relationship.
- Enhancement TPT in SQL Generation.
- Performance Enhancements are included in EF 5.0
- The StoreGeneratedPattern for key columns can now be set on an entity Properties window and this value will propagate from your entity model down to the stored definition. The stored Generated Pattern attribute allows you to control how the Entity Framework synchronizes database column values and entity property values; see:
- Entity Designer Enhancement:
- The entity designer supports selection-driven highlighting and entity-shape coloring.
- The entity designer is now able to import SP when using Entity Model Wizard. The result is that each SP will automatically become a new complex type in Entity Model.
- Data Annotation is now moved to System.ComponentModel.DataAnnotations.dll (the supported namespace is System.ComponentModel.DataAnnotations.Schema) and it originally was removed from the EntityFramework.dll.
- Visual Studio 11 Beta includes LocalDB instead of SQLEXPRESS. The Entity Framework Containing NuGet Package will check which database is available; if SQLEXPRESS is running then it would be used otherwise if Local DB is registered as the default instead during installation.
- EF 5.0 is able to map a stored procedure that returns multiple result sets to the types in the conceptual Model.
- EF 5.0 is able to generate object layer code using DBContext Generator.