BetterMembership.Extensions.DatabaseExtensions.TableExists C# (CSharp) Méthode

TableExists() public static méthode

public static TableExists ( this db, string tableName ) : bool
db this
tableName string
Résultat bool
        public static bool TableExists(this IDatabase db, string tableName)
        {
            var query = db.QuerySingle(@"SELECT * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = @0", tableName);
            return query != null;
        }
    }