EntityTypeConfiguration(Of TEntityType) Class
Entity Framework 5.0
Allows configuration to be performed for an entity type in a model. An EntityTypeConfiguration(Of TEntityType) can be obtained by using the Entity method on DbModelBuilder or a custom type derived from EntityTypeConfiguration(Of TEntityType) can be registered by using the Configurations property on DbModelBuilder.
System.Object
System.Data.Entity.ModelConfiguration.Configuration.StructuralTypeConfiguration(Of TEntityType)
System.Data.Entity.ModelConfiguration.EntityTypeConfiguration(Of TEntityType)
System.Data.Entity.ModelConfiguration.Configuration.StructuralTypeConfiguration(Of TEntityType)
System.Data.Entity.ModelConfiguration.EntityTypeConfiguration(Of TEntityType)
Namespace: System.Data.Entity.ModelConfiguration
Assembly: EntityFramework (in EntityFramework.dll)
The EntityTypeConfiguration(Of TEntityType) type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | EntityTypeConfiguration(Of TEntityType) | Initializes a new instance of EntityTypeConfiguration(Of TEntityType). |
| Name | Description | |
|---|---|---|
![]() | Equals | Determines whether the specified object is equal to the current object. This method is hidden from IntelliSense. (Overrides StructuralTypeConfiguration(Of TStructuralType).Equals(Object).) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. This method is hidden from IntelliSense. (Overrides StructuralTypeConfiguration(Of TStructuralType).GetHashCode.) |
![]() | GetType | Gets the type of the current instance. This method is hidden from IntelliSense. |
![]() | HasEntitySetName | Configures the entity set name to be used for this entity type. The entity set name can only be configured for the base type in each set. |
![]() | HasKey(Of TKey) | Configures the primary key property(s) for this entity type. |
![]() | HasMany(Of TTargetEntity) | Configures a many relationship from this entity type. |
![]() | HasOptional(Of TTargetEntity) | Configures an optional relationship from this entity type. Instances of the entity type will be able to be saved to the database without this relationship being specified. The foreign key in the database will be nullable. |
![]() | HasRequired(Of TTargetEntity) | Configures a required relationship from this entity type. Instances of the entity type will not be able to be saved to the database unless this relationship is specified. The foreign key in the database will be non-nullable. |
![]() | Ignore(Of TProperty) | Excludes a property from the model so that it will not be mapped to the database. (Inherited from StructuralTypeConfiguration(Of TStructuralType).) |
![]() | Map(Action(Of EntityMappingConfiguration(Of TEntityType))) | Allows advanced configuration related to how this entity type is mapped to the database schema. By default, any configuration will also apply to any type derived from this entity type. Derived types can be configured by using the specific overload of this method that configures a derived type or by using an EntityTypeConfiguration(Of TEntityType) for the derived type. The properties of an entity can be split between multiple tables using multiple calls to this method. Calls are additive, and subsequent calls will not override configuration already performed by previous calls to this method. |
![]() | Map(Of TDerived)(Action(Of EntityMappingConfiguration(Of TDerived))) | Allows advanced configuration related to how a derived entity type is mapped to the database schema. Calls to this method are additive, and subsequent calls will not override configuration already performed by previous calls to this method. |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | Property(Of T)(Expression(Of Func(Of TStructuralType, T))) | Configures a struct property that is defined on this type. (Inherited from StructuralTypeConfiguration(Of TStructuralType).) |
![]() | ToString | Returns a string that represents the current object. This method is hidden from IntelliSense. (Overrides StructuralTypeConfiguration(Of TStructuralType).ToString.) |
![]() | ToTable(String) | Configures the table name that this entity type is mapped to. |
![]() | ToTable(String, String) | Configures the table name that this entity type is mapped to. |
Show:
