ISEbd-21 Melnikov I.O. Lab Work 05 Base #11

Closed
Igor-Melnikov wants to merge 15 commits from lab5 into lab4
2 changed files with 7 additions and 6 deletions
Showing only changes of commit a326c3a247 - Show all commits

View File

@ -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 =>

View File

@ -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)