LinqConnect Documentation
In This Topic
    Specifying Table Name
    In This Topic
    Specifying Table Name
    LinqConnect Documentation
    Specifying Table Name
    [email protected]

    The name of a table the entity is mapped to can be specified with the following methods:

    • TableName(string tableName) - accepts the unquoted table name as a parameter.
    • SchemaName(string schemaName) - accepts the unquoted schema name as a parameter.
    • DatabaseName(string databaseName) - accepts the unquoted database name as a parameter.
    • FullTableName(string fullTableName) - accepts the fully qualified table name which can be, if needed, a composite quoted identifier.

    If full table name is not specified, the TableNameConvention convention will generate it using the class name or TableName, SchemaName, and DatabaseName parameters. Parts of the full name will be quoted, if needed, according to the quoting rules of the specific database.

    builder.Entity<Order>()
        .FullTableName(@"CRM_DEMO.""Orders""");
     
    builder.Entity<Order>()
        .SchemaName("CRM_DEMO");
        .TableName("Orders");