public bool TableExists(DbConnection cnx, TableName table) { var name = _utils.EscapeTableName(table); return cnx.GetValue<int?>(c => c.Sql($"select OBJECT_ID (N'{name}', N'U')")).HasValue; }
public bool TableExists(DbConnection cnx, TableName table) { return cnx.GetValue<bool?>($"SELECT 1 FROM sqlite_master WHERE type='table' AND name=@0", table.Name)??false; }