Compare commits
No commits in common. "dd808b4e5fc19e696822ba22b4362082e62221eb" and "adc5aed3d8cc1057b3ae0b0d938a9cde1d1e7c27" have entirely different histories.
dd808b4e5f
...
adc5aed3d8
2
.gitignore
vendored
2
.gitignore
vendored
@ -398,4 +398,4 @@ FodyWeavers.xsd
|
|||||||
# JetBrains Rider
|
# JetBrains Rider
|
||||||
*.sln.iml
|
*.sln.iml
|
||||||
|
|
||||||
*.dll
|
/FishFactory/ImplementationExtensions
|
||||||
|
@ -79,7 +79,7 @@ namespace FishFactoryDatabaseImplement.Implements
|
|||||||
}
|
}
|
||||||
shop.Update(model);
|
shop.Update(model);
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
shop.UpdateCanneds(context, model);
|
shop.UpdateSushi(context, model);
|
||||||
transaction.Commit();
|
transaction.Commit();
|
||||||
return shop.GetViewModel;
|
return shop.GetViewModel;
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@ namespace FishFactoryDatabaseImplement.Implements
|
|||||||
{
|
{
|
||||||
shop.ListCanneds[model.Id] = (shop.ListCanneds[model.Id].Item1, countInCurrentShop - count);
|
shop.ListCanneds[model.Id] = (shop.ListCanneds[model.Id].Item1, countInCurrentShop - count);
|
||||||
count = 0;
|
count = 0;
|
||||||
shop.UpdateCanneds(context, new()
|
shop.UpdateSushi(context, new()
|
||||||
{
|
{
|
||||||
Id = shop.Id,
|
Id = shop.Id,
|
||||||
ListCanneds = shop.ListCanneds,
|
ListCanneds = shop.ListCanneds,
|
||||||
|
@ -77,7 +77,7 @@ namespace FishFactoryDatabaseImplement.Models
|
|||||||
ListCanneds = ListCanneds
|
ListCanneds = ListCanneds
|
||||||
};
|
};
|
||||||
|
|
||||||
public void UpdateCanneds(FishFactoryDatabase context, ShopBindingModel model)
|
public void UpdateSushi(FishFactoryDatabase context, ShopBindingModel model)
|
||||||
{
|
{
|
||||||
var shopCanned = context.ShopCanned.Where(rec => rec.ShopId == model.Id).ToList();
|
var shopCanned = context.ShopCanned.Where(rec => rec.ShopId == model.Id).ToList();
|
||||||
if (shopCanned != null && shopCanned.Count > 0)
|
if (shopCanned != null && shopCanned.Count > 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user