What's new in ADO.NET Entity Framework 4.1.10715.0

Jul 26, 2011
  • Bug fix to remove the need to specify ‘Persist Security Info=True’ in the connection string when using SQL authentication. This change predominantly affects users connecting to SQL Azure.
  • Introduction of new types to facilitate design-time tools for Code First:
  • DbContextInfo can be used to instantiate and interact with a derived context as well as determine information about the origin of the connection string etc..
  • IDbContextFactory is used to let DbContextInfo know how to construct derived DbContext types that do not expose a default constructor. If your context does not expose a default constructor then an implementation if IDbContextFactory should be included in the same assembly as your derived context type.

New in ADO.NET Entity Framework 4.1.10311.0 RC (Mar 16, 2011)

  • The DbContext API is a simplified abstraction over ObjectContext and a number of other types that were included in previous releases of the ADO.NET Entity Framework. The DbContext API surface is optimized for common tasks and coding patterns.
  • Code First is a new development pattern for the ADO.NET Entity Framework and provides an alternative to the existing Database First and Model First patterns. Code First is focused around defining your model using CLR classes, these classes can then be mapped to an existing database or be used to generate a database schema. Additional configuration can be supplied using Data Annotations or via a fluent API.
  • Rename of ‘DbDatabase’ to ‘Database’. This class has also moved to the ‘System.Data.Entity’ namespace, along with the database initializer classes.
  • Rename of ‘ModelBuilder’ to ‘DbModelBuilder’, to align with the other core classes.
  • Validation in Model First and Database First. The new validation feature was only supported in Code First in CTP5. In RC the validation feature will work with all three development workflows (Model First, Database First, and Code First).
  • Intellisense and online docs. Feature CTPs were not extensively documented because the API surface was changing significantly between each release. This release includes complete documentation.
  • Removal of Code First Pluggable Conventions. Pluggable Conventions were previewed in Feature CTP5 but were not at go-live quality for this release. This release still supports the removal of default conventions.
  • Consolidation of IsIndependent in the Code First relationship API. When configuring relationships in Feature CTP5 the IsIndependent method was used to identify that the relationship did not have a foreign key property exposed in the object model. This is now done by calling the Map method. HasForeignKey is still used for relationships where the foreign key property is exposed in the object model.