ForeignKeyAssociationMappingConfiguration Class

Definition

Configures the table and column mapping of a relationship that does not expose foreign key properties in the object model. This configuration functionality is available via the Code First Fluent API, see DbModelBuilder.

public sealed class ForeignKeyAssociationMappingConfiguration : System.Data.Entity.ModelConfiguration.Configuration.AssociationMappingConfiguration
type ForeignKeyAssociationMappingConfiguration = class
    inherit AssociationMappingConfiguration
Public NotInheritable Class ForeignKeyAssociationMappingConfiguration
Inherits AssociationMappingConfiguration
Inheritance
ForeignKeyAssociationMappingConfiguration

Methods

Equals(ForeignKeyAssociationMappingConfiguration)

Determines whether the specified object is equal to the current object.

Equals(Object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

GetType()

Gets the Type of the current instance.

HasColumnAnnotation(String, String, Object)

Sets an annotation in the model for a database column that has been configured with MapKey(String[]). The annotation value can later be used when processing the column such as when creating migrations.

MapKey(String[])

Configures the name of the column(s) for the foreign key.

ToString()

Returns a string that represents the current object.

ToTable(String)

Configures the table name that the foreign key column(s) reside in. The table that is specified must already be mapped for the entity type. If you want the foreign key(s) to reside in their own table then use the Map method on System.Data.Entity.ModelConfiguration.EntityTypeConfiguration to perform entity splitting to create the table with just the primary key property. Foreign keys can then be added to the table via this method.

ToTable(String, String)

Configures the table name and schema that the foreign key column(s) reside in. The table that is specified must already be mapped for the entity type. If you want the foreign key(s) to reside in their own table then use the Map method on System.Data.Entity.ModelConfiguration.EntityTypeConfiguration to perform entity splitting to create the table with just the primary key property. Foreign keys can then be added to the table via this method.

Applies to