From 390b0d1012c28ff152a6970587ae4ede7e08cd15 Mon Sep 17 00:00:00 2001 From: platoff aeeee Date: Sun, 28 Apr 2024 14:57:10 +0400 Subject: [PATCH] =?UTF-8?q?=D0=93=D0=BE=D1=82=D0=BE=D0=B2=D0=B0=D1=8F=203?= =?UTF-8?q?=20=D0=BB=D0=B0=D0=B1=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implements/OrderStorage.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/FurnitureAssembly/FurnitureAssemblyFileImplement/Implements/OrderStorage.cs b/FurnitureAssembly/FurnitureAssemblyFileImplement/Implements/OrderStorage.cs index 5a9ae3e..d624de4 100644 --- a/FurnitureAssembly/FurnitureAssemblyFileImplement/Implements/OrderStorage.cs +++ b/FurnitureAssembly/FurnitureAssemblyFileImplement/Implements/OrderStorage.cs @@ -45,17 +45,13 @@ namespace FurnitureAssemblyFileImplement.Implements return source.Orders.FirstOrDefault(x => (model.Id.HasValue && x.Id == model.Id))?.GetViewModel; } - // Для загрузки названий изделия в заказе private OrderViewModel GetViewModel(Order order) { var viewModel = order.GetViewModel; var furniture = source.Furnitures.FirstOrDefault(x => x.Id == order.FurnitureId); - if (furniture != null) - { - viewModel.FurnitureName = furniture.FurnitureName; - } + viewModel.FurnitureName = furniture?.FurnitureName; return viewModel; }