Entity Framework June CTP Gets Enum, Spatial Data-Types, Better VS Tooling
Entity Framework June 2011 CTP comes with several features like support for Enum data-type, two new spatial data-types for Geography and Geometry, automatically compiled and cached LINQ queries, and more. There are also several Visual Studio improvements like multiple diagrams for an EF Model and batch import of Stored Procedures.
The new runtime features added are -
Enum data-type is now available for use just like any other scalar property, such as in LINQ queries and updates
Two new spatial data-types for Geography and Geometry are natively supported by the Entity Framework
Can add Table-valued functions to the entity data model
Stored procedures can now have multiple result sets in your entity data model
Several SQL generation improvements, especially around optimizing queries over models with table-per-type (TPT) inheritance
LINQ queries are now automatically compiled and cached to improve query performance instead of having to use CompiledQuery class
There are several new features for the Entity Framework Designer within Visual Studio:
Supports creation of Enums, spatial data-types and table-valued functions from the designer surface
You can now create multiple diagrams for each entity data model. Each diagram can contain entities and relationships to make visualizing your model easier. You can switch between diagrams using the Model Browser and include related entities on each diagram as an optional command.
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 store definition.
Diagram information is now stored in a separate file from the edmx or entity code files.
Can now batch import your stored procedures as function imports using the Entity Model Wizard. The result shape of each stored procedure will automatically become a new complex type in your entity model.
The Entity Designer surface now supports selection driven highlighting and entity shape coloring.
There are also a few features that did not make it to the June CTP but are work-in-progress. The ADO.NET team had this to say in their official blog post -
There are a number of commonly requested features that did not make it into this CTP of the Entity Framework. We appreciate that these are really important to you and our team has started work on a number of them already. We will be reaching out for your feedback on these features soon:
- Stored Procedure or table-valued function support in Code First
- Migration support in Code First
- Customizable conventions in Code First
- Unique constraints support
- Batching create-update-delete statements during save
- Second level caching
More details including walkthroughs for some new features can be found on the ADO.NET team blog.
Entity Framework is an Object-Relational Mapper from Microsoft for .NET Applications. It provides strongly-typed LINQ data-access experience over relational databases, including direct, efficient access to SQL Server and boasts of strong design-time features in Visual Studio.
Mike Keane Dec 21, 2014
Jeremy Stieglitz Dec 21, 2014