From 01e6d6c16879fd00dd3b3c5369bfa85de6afd3d5 Mon Sep 17 00:00:00 2001 From: abazov73 <92822431+abazov73@users.noreply.github.com> Date: Mon, 20 Feb 2023 10:46:32 +0400 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=82=D0=BE=D1=80=D0=B0=D1=8F=20=D0=BB?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD=D0=B0?= =?UTF-8?q?=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0.=20=D0=A4=D0=B8?= =?UTF-8?q?=D0=BA=D1=81=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D0=BE=D0=B9?= =?UTF-8?q?=20=D0=B2=20IngredientStorage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implements/IngredientStorage.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Confectionery/ConfectioneryFileImplements/Implements/IngredientStorage.cs b/Confectionery/ConfectioneryFileImplements/Implements/IngredientStorage.cs index 934020f..721efda 100644 --- a/Confectionery/ConfectioneryFileImplements/Implements/IngredientStorage.cs +++ b/Confectionery/ConfectioneryFileImplements/Implements/IngredientStorage.cs @@ -62,14 +62,14 @@ namespace ConfectioneryFileImplement.Implements } public IngredientViewModel? Update(IngredientBindingModel model) { - var component = source.Ingredients.FirstOrDefault(x => x.Id == model.Id); - if (component == null) + var ingredient = source.Ingredients.FirstOrDefault(x => x.Id == model.Id); + if (ingredient == null) { return null; } - component.Update(model); + ingredient.Update(model); source.SaveIngredients(); - return component.GetViewModel; + return ingredient.GetViewModel; } public IngredientViewModel? Delete(IngredientBindingModel model) {