From dd808b4e5fc19e696822ba22b4362082e62221eb Mon Sep 17 00:00:00 2001 From: ArtemEmelyanov Date: Fri, 5 May 2023 14:56:04 +0400 Subject: [PATCH] =?UTF-8?q?=D1=81=D1=83=D0=BF=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FishFactoryDatabaseImplement/Implements/ShopStorage.cs | 4 ++-- FishFactory/FishFactoryDatabaseImplement/Models/Shop.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FishFactory/FishFactoryDatabaseImplement/Implements/ShopStorage.cs b/FishFactory/FishFactoryDatabaseImplement/Implements/ShopStorage.cs index 4becaaf..f177ba4 100644 --- a/FishFactory/FishFactoryDatabaseImplement/Implements/ShopStorage.cs +++ b/FishFactory/FishFactoryDatabaseImplement/Implements/ShopStorage.cs @@ -79,7 +79,7 @@ namespace FishFactoryDatabaseImplement.Implements } shop.Update(model); context.SaveChanges(); - shop.UpdateSushi(context, model); + shop.UpdateCanneds(context, model); transaction.Commit(); return shop.GetViewModel; } @@ -129,7 +129,7 @@ namespace FishFactoryDatabaseImplement.Implements { shop.ListCanneds[model.Id] = (shop.ListCanneds[model.Id].Item1, countInCurrentShop - count); count = 0; - shop.UpdateSushi(context, new() + shop.UpdateCanneds(context, new() { Id = shop.Id, ListCanneds = shop.ListCanneds, diff --git a/FishFactory/FishFactoryDatabaseImplement/Models/Shop.cs b/FishFactory/FishFactoryDatabaseImplement/Models/Shop.cs index 573667d..509a72e 100644 --- a/FishFactory/FishFactoryDatabaseImplement/Models/Shop.cs +++ b/FishFactory/FishFactoryDatabaseImplement/Models/Shop.cs @@ -77,7 +77,7 @@ namespace FishFactoryDatabaseImplement.Models ListCanneds = ListCanneds }; - public void UpdateSushi(FishFactoryDatabase context, ShopBindingModel model) + public void UpdateCanneds(FishFactoryDatabase context, ShopBindingModel model) { var shopCanned = context.ShopCanned.Where(rec => rec.ShopId == model.Id).ToList(); if (shopCanned != null && shopCanned.Count > 0)