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 msdn.com/data/ef.]

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

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

Syntax

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

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

Parameters

  • 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

Reference

EntityTypeConfiguration<TEntityType> Class

ToTable Overload

System.Data.Entity.ModelConfiguration Namespace