This commit is contained in:
gg12 darfren 2024-03-25 22:54:20 +04:00
parent 7dbe4f7475
commit 09436aa2c4

View File

@ -90,7 +90,7 @@ namespace IceCreamShopDatabaseImplement.Models
if (shopIceCreams != null && shopIceCreams.Count > 0) if (shopIceCreams != null && shopIceCreams.Count > 0)
{ {
context.ShopIceCreams.RemoveRange(shopIceCreams.Where(rec context.ShopIceCreams.RemoveRange(shopIceCreams.Where(rec
=> !model.ShopIceCreams.ContainsKey(rec.ShopId))); => !model.ShopIceCreams.ContainsKey(rec.IceCreamId)));
context.SaveChanges(); context.SaveChanges();
foreach (var updateIceCream in shopIceCreams) foreach (var updateIceCream in shopIceCreams)