Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

DbModelBuilderVersion Enumeration

Entity Framework 5.0

A value from this enumeration can be provided directly to the DbModelBuilder class or can be used in the DbModelBuilderVersionAttribute applied to a class derived from DbContext. The value used defines which version of the DbContext and DbModelBuilder conventions should be used when building a model from code.

Namespace:  System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)
public enum DbModelBuilderVersion
Member nameDescription
LatestIndicates that the latest version of the DbModelBuilder and DbContext conventions should be used.

V4_1Indicates that the version of the DbModelBuilder and DbContext conventions shipped with Entity Framework v4.1 should be used.

V5_0_Net4Indicates that the version of the DbModelBuilder and DbContext conventions shipped with Entity Framework v5.0 when targeting .Net Framework 4 should be used.
V5_0Indicates that the version of the DbModelBuilder and DbContext conventions shipped with Entity Framework v5.0 should be used.

Using Latest ensures that all the latest functionality is available when upgrading to a new release of the Entity Framework. However, it may result in an application behaving differently with the new release than it did with a previous release. This can be avoided by using a specific version of the conventions, but if a version other than the latest is set then not all the latest functionality will be available.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.