BetterMembership.Extensions.DatabaseExtensions.TableExists C# (CSharp) Method

TableExists() public static method

public static TableExists ( this db, string tableName ) : bool
db this
tableName string
return 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;
        }
    }