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

Closed
Igor-Melnikov wants to merge 15 commits from lab5 into lab4
Showing only changes of commit 9d337fa987 - Show all commits

View File

@ -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
};
}