diff --git a/IceCreamShop/IceCreamShopDatabaseImplement/Models/Order.cs b/IceCreamShop/IceCreamShopDatabaseImplement/Models/Order.cs index 95fb1d6..aa660a9 100644 --- a/IceCreamShop/IceCreamShopDatabaseImplement/Models/Order.cs +++ b/IceCreamShop/IceCreamShopDatabaseImplement/Models/Order.cs @@ -93,7 +93,7 @@ namespace IceCreamShopDatabaseImplement.Models DateCreate = DateCreate, DateImplement = DateImplement, Id = Id, - IceCreamName = IceCream?.IceCreamName ?? string.Empty, + IceCreamName = context.IceCreams.FirstOrDefault(x => x.Id == IceCreamId)?.IceCreamName ?? string.Empty, ImplementerFIO = Implementer?.ImplementerFIO ?? string.Empty, ClientFIO = Client?.ClientFIO ?? string.Empty, };