fix
This commit is contained in:
parent
5e0e8a205d
commit
26eb266c01
@ -207,7 +207,7 @@ namespace ShipyardDataBaseImplement.Migrations
|
||||
modelBuilder.Entity("ShipyardDataBaseImplement.Models.ShopShip", b =>
|
||||
{
|
||||
b.HasOne("ShipyardDataBaseImplement.Models.Ship", "Ship")
|
||||
.WithMany("Ships")
|
||||
.WithMany("Shops")
|
||||
.HasForeignKey("ShipId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
@ -234,7 +234,7 @@ namespace ShipyardDataBaseImplement.Migrations
|
||||
|
||||
b.Navigation("Orders");
|
||||
|
||||
b.Navigation("Ships");
|
||||
b.Navigation("Shops");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ShipyardDataBaseImplement.Models.Shop", b =>
|
||||
|
@ -37,7 +37,7 @@ namespace ShipyardDataBaseImplement.Models
|
||||
[ForeignKey("ShipId")]
|
||||
public virtual List<Order> Orders { get; set; } = new();
|
||||
[ForeignKey("ShipId")]
|
||||
public virtual List<ShopShip> Ships { get; set; } = new();
|
||||
public virtual List<ShopShip> Shops { get; set; } = new();
|
||||
public static Ship Create(ShipyardDataBase context, ShipBindingModel model)
|
||||
{
|
||||
return new Ship()
|
||||
|
@ -15,7 +15,7 @@ namespace ShipyardDataBaseImplement
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false)
|
||||
{
|
||||
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-M8EKKPQ\SQLEXPRESS;Initial Catalog=ShipyardDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-M8EKKPQ\SQLEXPRESS;Initial Catalog=ShipyardDatabaseLab3;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user