protected virtual ModelIndex CreateModelIndex(ModelTable owner) { return(new ModelIndex() { Table = owner }); }
protected virtual ModelColumn CreateModelColumn(ModelTable owner) { return(new ModelColumn() { Table = owner }); }
protected virtual ModelIndex CreateModelIndex(ModelTable owner) { return new ModelIndex() { Table = owner }; }
protected virtual ModelColumn CreateModelColumn(ModelTable owner) { return new ModelColumn() { Table = owner }; }
public static ModelRelation[] GetToRelations(this ModelTable table) { return(table.Model.Relations.Where(r => r.ForeignTable == table).ToArray()); }
public static ModelRelation[] GetFromRelations(this ModelTable table) { return(table.Model.Relations.Where(r => r.PrimaryTable == table).ToArray()); }
public static ModelColumn[] GetPrimaryKeyColumns(this ModelTable table) { return(table.Columns.Where(c => c.IsPrimaryKey).ToArray()); }
public static ModelColumn GetColumn(this ModelTable table, string name) { return(table.Columns.SingleOrDefault(c => name.Equals(c.Name, StringComparison.OrdinalIgnoreCase))); }