Beispiel #1
0
 public static IAddedForeignKey AddDefaultForeignKeyTo(this IExistingTable table, string otherTable)
 {
     return(table.AddForeignKeyTo(otherTable).Through(ForeignKey.ColumnTo(otherTable), "Id"));
 }
Beispiel #2
0
 public static ICreatedTableWithAddedColumn WithForeignKeyColumnTo(this ICreatedTableBase table, string otherTable, string columnName, bool required = true)
 {
     return(required
         ? table.WithNotNullableColumn(ForeignKey.ColumnTo(otherTable), DbType.Guid)
         : table.WithNullableColumn(ForeignKey.ColumnTo(otherTable), DbType.Guid));
 }