Friday, October 5, 2012

What’s New in EF5

EF 5 includes a number of new features and bug fixes to the EF4.3 release. Most of the new features are only available in applications targeting .NET 4.5, see the Compatibility section for more details.
  1. Enum support allows you to have enum properties in your entity classes.
  2. Spatial data types can now be exposed in your model using the DbGeography and DbGeometry types.
  3. The Performance enhancements –
    3.1 Automatic Compilation of Linq to Entities queries.
    3.2 67% increase in performance over 4.0
  4. Code First will now detect if you have LocalDb or SQL Express available for creating new databases. Visual Studio 2012 includes LocalDb, whereas Visual Studio 2010 includes SQL Express.
  5. Code First will add tables to existing database if the target database doesn’t contain any of the tables from the model. The EF Designer in Visual Studio 2012 also has some new features:
  6. DbContext code generation for new models means that any new models created using the EF Designer will generate a derived DbContext and POCO classes by default. You can always revert to ObjectContext code generation if needed. Existing models will not automatically change to DbContext code generation.
  7. Multiple-diagrams per model allow you to have several diagrams that visualize subsections of your overall model. Shapes on the design surface can also have coloring applied.
  8. Table-Valued functions in an existing database can now be added to your model.
  9. Batch import of stored procedures allows multiple stored procedures to be added to the model during model creation.

No comments:

Post a Comment