From 9d337fa987881c3c06e1126152ad18da45369200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=BA=20=D0=98=D0=B3=D0=BE=D1=80=D1=8C?= Date: Tue, 25 Apr 2023 16:09:25 +0400 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=D1=8B=20=D0=BF=D0=BE?= =?UTF-8?q?=20=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BlacksmithWorkshopDatebaseImplement/Models/Order.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 }; }