示例#1
0
    public static bool CheckTableExistence(this ISqlConnectionProvider sqlConnectionProvider, string schema, string table)
    {
        var objectId = sqlConnectionProvider.ExecuteScalar <int?>($"SELECT OBJECT_ID('{schema}.{table}', 'U')");

        return(objectId.HasValue);
    }