diff --git a/BlacksmithWorkshop/BlacksmithWorkshopDatebaseImplement/Models/Order.cs b/BlacksmithWorkshop/BlacksmithWorkshopDatebaseImplement/Models/Order.cs index 2fe6388..ae4020f 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopDatebaseImplement/Models/Order.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopDatebaseImplement/Models/Order.cs @@ -23,7 +23,7 @@ namespace BlacksmithWorkshopDatabaseImplement.Models [Required] public int ClientId { get; private set; } [Required] - public virtual Client Client { get; private set; } = new(); + public virtual Client? Client { get; private set; } public static Order? Create(OrderBindingModel model) { if (model == null) @@ -76,6 +76,7 @@ namespace BlacksmithWorkshopDatabaseImplement.Models Status = Status, DateCreate = DateCreate, DateImplement = DateImplement, + ClientId = ClientId, ClientFIO = Client?.ClientFIO ?? string.Empty }; }