Оптимизировано получение фио клиента

This commit is contained in:
Данияр Аглиуллов 2023-03-08 16:13:23 +04:00
parent 97b76f3ba6
commit 93d8e0596a

View File

@ -84,8 +84,7 @@ namespace ConfectioneryDatabaseImplement.Models
return new()
{
PastryName = context.Pastries.FirstOrDefault(x => x.Id == PastryId)?.PastryName ?? string.Empty,
// ??????
ClientFIO = Client?.ClientFIO ?? context.Clients.FirstOrDefault(x => x.Id == ClientId)?.ClientFIO ?? string.Empty,
ClientFIO = Client?.ClientFIO ?? string.Empty,
PastryId = PastryId,
Count = Count,
Sum = Sum,