фиксы по клиенту

This commit is contained in:
Мк Игорь 2023-04-25 16:09:25 +04:00
parent fb5b49162c
commit 9d337fa987

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