Share via

EntityTypeConfiguration<TEntityType>.ToTable Method (String, String)

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see]

Configures the table name that this entity type is mapped to.

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


Public Function ToTable ( _
    tableName As String, _
    schemaName As String _
) As EntityTypeConfiguration(Of TEntityType)
Dim instance As EntityTypeConfiguration 
Dim tableName As String 
Dim schemaName As String 
Dim returnValue As EntityTypeConfiguration(Of TEntityType)

returnValue = instance.ToTable(tableName, _
public EntityTypeConfiguration<TEntityType> ToTable(
    string tableName,
    string schemaName
EntityTypeConfiguration<TEntityType>^ ToTable(
    String^ tableName, 
    String^ schemaName
member ToTable : 
        tableName:string * 
        schemaName:string -> EntityTypeConfiguration<'TEntityType> 
public function ToTable(
    tableName : String, 
    schemaName : String
) : EntityTypeConfiguration<TEntityType>


  • schemaName
    Type: System.String
    The database schema of the table.

Return Value

Type: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<TEntityType>
The same EntityTypeConfiguration instance so that multiple calls can be chained.

See Also


EntityTypeConfiguration<TEntityType> Class

ToTable Overload

System.Data.Entity.ModelConfiguration Namespace