forked from sanchezvem/PyroFetes
Error during migration
This commit is contained in:
@@ -66,18 +66,5 @@ public class PyroFetesDbContext : DbContext
|
|||||||
// Models customization
|
// Models customization
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
// Relation SourceWarehouse
|
|
||||||
modelBuilder.Entity<Movement>()
|
|
||||||
.HasOne(m => m.SourceWarehouse)
|
|
||||||
.WithMany(w => w.MovementsSource)
|
|
||||||
.HasForeignKey(m => m.SourceWarehouseId)
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
// Relation DestinationWarehouse
|
|
||||||
modelBuilder.Entity<Movement>()
|
|
||||||
.HasOne(m => m.DestinationWarehouse)
|
|
||||||
.WithMany(w => w.MovementsDestination)
|
|
||||||
.HasForeignKey(m => m.DestinationWarehouseId)
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user