Exemplo n.º 1
0
 public void AddFK(ForeignKeySchema fk)
 {
     fks.Add(fk);
     (fk.OtherTable as TableSchema).children.Add(new ForeignKeySchema {
         OtherTable = this, OtherKey = fk.ThisKey, ThisTable = fk.OtherTable, ThisKey = fk.OtherKey
     });
 }
Exemplo n.º 2
0
        public void AddForeignKey(ForeignKeySchema fk)
        {
            _foreignKeys.Add(fk);
            fk.OtherTable._children.Add(this);
            var col = AllColumns.Where(t => t.ColumnName == fk.ThisKey.ColumnName).First();

            col.IsForeignKey = true;
        }