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