This commit is contained in:
gg12 darfren 2024-04-14 18:39:07 +04:00
parent 17138020cd
commit bdb15b04aa
2 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,8 @@ namespace IceCreamShopDatabaseImplement.Models
public void UpdateIceCreams(IceCreamShopDataBase context,
ShopBindingModel model)
{
if (model.ShopIceCreams == null)
return;
var shopIceCreams = context.ShopIceCreams.Where(rec =>
rec.ShopId == model.Id).ToList();
if (shopIceCreams != null && shopIceCreams.Count > 0)

View File

@ -68,6 +68,7 @@ namespace IceCreamShopRestApi.Controllers
{
try
{
model.ShopIceCreams = null!;
return _logic.Update(model);
}
catch (Exception ex)