EntityMappingConfiguration(TEntityType) Class
Collapse the table of content
Expand the table of content

EntityMappingConfiguration<TEntityType> Class

Entity Framework 5.0

Configures the table and column mapping for an entity type or a sub-set of properties from an entity type. This configuration functionality is exposed by the Code First fluent API, see DbModelBuilder.


Namespace:  System.Data.Entity.ModelConfiguration.Configuration
Assembly:  EntityFramework (in EntityFramework.dll)

public class EntityMappingConfiguration<TEntityType>
where TEntityType : class

Type Parameters


The entity type to be mapped.

The EntityMappingConfiguration<TEntityType> type exposes the following members.

Public methodEntityMappingConfiguration<TEntityType>Initializes a new instance of the EntityMappingConfiguration<TEntityType> class.

Public methodEqualsDetermines whether the specified object is equal to the current object. This method is hidden from IntelliSense. (Overrides Object.Equals(Object).)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. This method is hidden from IntelliSense. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the type of the current instance. This method is hidden from IntelliSense.
Public methodMapInheritedProperties Re-maps all properties inherited from base types. When configuring a derived type to be mapped to a separate table this will cause all properties to be included in the table rather than just the non-inherited properties. This is known as Table per Concrete Type (TPC) mapping.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodProperties<TObject> Configures the properties that will be included in this mapping fragment. If this method is not called then all properties that have not yet been included in a mapping fragment will be configured.
Public methodRequires(String) Configures the discriminator column used to differentiate between types in an inheritance hierarchy.
Public methodRequires<TProperty>(Expression<Func<TEntityType, TProperty>>) Configures the discriminator condition used to differentiate between types in an inheritance hierarchy.
Public methodToStringReturns a string that represents the current object. This method is hidden from IntelliSense. (Overrides Object.ToString().)
Public methodToTable(String) Configures the table name to be mapped to.
Public methodToTable(String, String) Configures the table name and schema to be mapped to.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft