Compare commits

...

3 Commits

Author SHA1 Message Date
ArtemEmelyanov
dd808b4e5f супер 2023-05-05 14:56:04 +04:00
ArtemEmelyanov
ac4e4b254e Сдал лабу, пофиксил конфликты, удалил максу рабочий стол, жизнь удалась 2023-05-05 14:56:00 +04:00
ArtemEmelyanov
505e548be0 говно 2023-05-05 11:13:53 +04:00
3 changed files with 4 additions and 4 deletions

2
.gitignore vendored
View File

@ -398,4 +398,4 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml
/FishFactory/ImplementationExtensions
*.dll

View File

@ -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,

View File

@ -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)