ПИбд-23 Салин Олег Алексеевич Лабораторная работа №5 (Усложненная) #20

Closed
Oleja123 wants to merge 40 commits from Lab5_Hard into Lab5
2 changed files with 3 additions and 0 deletions
Showing only changes of commit bdb15b04aa - Show all commits

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)