After upgrading to EF Core 3.0, the solution can not obtain the name of the table

Previously used item EF Core 2.0, table names acquired by the following method:

    var mapping=dbContext.Model.FindEntityType(modelType).Relational();
    var schema=mapping.Schema;
    var tableName=mapping.TableName;

Upgrade to 3.0, the following method can be used instead

    var mapping=dbContext.Model.FindEntityType(modelType);
    var schema=mapping.GetSchema();
    var tableName=mapping.GetTableName();

Guess you like

Origin www.cnblogs.com/harry-wang/p/11596893.html