IndependentAssociationMappingConfiguration.ToTable Method (String, String)
This page is specific to the Entity Framework 4.1 release documentation. The Entity Framework 4.1 is built on top of the Entity Framework 4 included in .NET Framework 4. The Entity Framework 4.1 can be downloaded and installed from the Microsoft Download Center. Other versions of the Entity Framework are also available:
Configures the table name and schema that the foreign key column(s) reside in.
Namespace: System.Data.Entity.ModelConfiguration.Configuration
Assembly: EntityFramework (in entityframework.dll)
Usage
Syntax
'Declaration
Public Function ToTable ( _
tableName As String, _
schemaName As String _
) As IndependentAssociationMappingConfiguration
public IndependentAssociationMappingConfiguration ToTable (
string tableName,
string schemaName
)
public:
IndependentAssociationMappingConfiguration^ ToTable (
String^ tableName,
String^ schemaName
)
public IndependentAssociationMappingConfiguration ToTable (
String tableName,
String schemaName
)
public function ToTable (
tableName : String,
schemaName : String
) : IndependentAssociationMappingConfiguration
Parameters
- tableName
Name of the table.
- schemaName
Schema of the table.
Return Value
The same IndependentAssociationMappingConfiguration instance so that multiple calls can be chained.
Remarks
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 EntityTypeConfiguration to perform entity splitting to create the table with just the primary key property. Foreign keys can then be added to the table by using this method.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server 2003 , Windows Server 2008, and Windows 2000
Target Platforms
See Also
Reference
IndependentAssociationMappingConfiguration Class
IndependentAssociationMappingConfiguration Members
System.Data.Entity.ModelConfiguration.Configuration Namespace