From b09f8b490f969226706ec2500dbadb936c4d49ec Mon Sep 17 00:00:00 2001 From: platoff aeeee Date: Sun, 28 Apr 2024 14:57:49 +0400 Subject: [PATCH] 2 lab done --- .../Implements/OrderStorage.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/FurnitureAssembly/FurnitureAssemblyFileImplement/Implements/OrderStorage.cs b/FurnitureAssembly/FurnitureAssemblyFileImplement/Implements/OrderStorage.cs index 5a9ae3e..6b8d5f1 100644 --- a/FurnitureAssembly/FurnitureAssemblyFileImplement/Implements/OrderStorage.cs +++ b/FurnitureAssembly/FurnitureAssemblyFileImplement/Implements/OrderStorage.cs @@ -52,10 +52,7 @@ namespace FurnitureAssemblyFileImplement.Implements var furniture = source.Furnitures.FirstOrDefault(x => x.Id == order.FurnitureId); - if (furniture != null) - { - viewModel.FurnitureName = furniture.FurnitureName; - } + viewModel.FurnitureName = furniture?.FurnitureName; return viewModel; }