исправление связи клиента с заказом
This commit is contained in:
parent
5e84b0154b
commit
a326c3a247
@ -44,7 +44,7 @@ namespace BlacksmithWorkshopDatebaseImplement.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
b.ToTable("Clients", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.Component", b =>
|
||||
@ -64,7 +64,7 @@ namespace BlacksmithWorkshopDatebaseImplement.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Components");
|
||||
b.ToTable("Components", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.Manufacture", b =>
|
||||
@ -84,7 +84,7 @@ namespace BlacksmithWorkshopDatebaseImplement.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Manufactures");
|
||||
b.ToTable("Manufactures", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.ManufactureComponent", b =>
|
||||
@ -110,7 +110,7 @@ namespace BlacksmithWorkshopDatebaseImplement.Migrations
|
||||
|
||||
b.HasIndex("ManufactureId");
|
||||
|
||||
b.ToTable("ManufactureComponents");
|
||||
b.ToTable("ManufactureComponents", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.Order", b =>
|
||||
@ -148,7 +148,7 @@ namespace BlacksmithWorkshopDatebaseImplement.Migrations
|
||||
|
||||
b.HasIndex("ManufactureId");
|
||||
|
||||
b.ToTable("Orders");
|
||||
b.ToTable("Orders", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.ManufactureComponent", b =>
|
||||
|
@ -22,7 +22,8 @@ namespace BlacksmithWorkshopDatabaseImplement.Models
|
||||
public DateTime? DateImplement { get; private set; }
|
||||
[Required]
|
||||
public int ClientId { get; private set; }
|
||||
public Client? Client { get; private set; }//вспомогательное поле для получения ФИО клиента
|
||||
[Required]
|
||||
public virtual Client Client { get; private set; } = new();
|
||||
public static Order? Create(OrderBindingModel model)
|
||||
{
|
||||
if (model == null)
|
||||
|
Loading…
Reference in New Issue
Block a user