EntityTypeConfiguration<TEntityType> Methods

The EntityTypeConfiguration<TEntityType> type exposes the following members.

  Name Description
Public method Equals Determines whether the specified object is equal to the current object. This method is hidden from IntelliSense. (Overrides StructuralTypeConfiguration<TStructuralType>.Equals(Object).)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. This method is hidden from IntelliSense. (Overrides StructuralTypeConfiguration<TStructuralType>.GetHashCode().)
Public method GetType Gets the type of the current instance. This method is hidden from IntelliSense.
Public method 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.
Public method HasKey<TKey> Configures the primary key property(s) for this entity type.
Public method HasMany<TTargetEntity> Configures a many relationship from this entity type.
Public method HasOptional<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.
Public method HasRequired<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.
Public method Ignore<TProperty> Excludes a property from the model so that it will not be mapped to the database. (Inherited from StructuralTypeConfiguration<TStructuralType>.)
Public method Map(Action<EntityMappingConfiguration<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<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.
Public method Map<TDerived>(Action<EntityMappingConfiguration<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.
Protected method MemberwiseClone (Inherited from Object.)
Public method Property<T>(Expression<Func<TStructuralType, T>>) Configures a struct property that is defined on this type. (Inherited from StructuralTypeConfiguration<TStructuralType>.)
Public method ToString Returns a string that represents the current object. This method is hidden from IntelliSense. (Overrides StructuralTypeConfiguration<TStructuralType>.ToString().)
Public method ToTable(String) Configures the table name that this entity type is mapped to.
Public method ToTable(String, String) Configures the table name that this entity type is mapped to.
Top
Show: