ForeignKeyAssociationMappingConfiguration.ToTable Method
Configures the table name that the foreign key column(s) reside in.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | 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 T: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 T: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. |
ForeignKeyAssociationMappingConfiguration.ToTable Method (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 T: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.
Parameters
- tableName
-
Type:
System.String
Name of the table.
Return Value
Type: System.Data.Entity.ModelConfiguration.Configuration.ForeignKeyAssociationMappingConfigurationThe same ForeignKeyAssociationMappingConfiguration instance so that multiple calls can be chained.
ForeignKeyAssociationMappingConfiguration.ToTable Method (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 T: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.
public ForeignKeyAssociationMappingConfiguration ToTable( string tableName, string schemaName )
Parameters
- tableName
-
Type:
System.String
Name of the table.
- schemaName
-
Type:
System.String
Schema of the table.
Return Value
Type: System.Data.Entity.ModelConfiguration.Configuration.ForeignKeyAssociationMappingConfigurationThe same ForeignKeyAssociationMappingConfiguration instance so that multiple calls can be chained.