.
This commit is contained in:
parent
17138020cd
commit
bdb15b04aa
@ -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)
|
||||
|
@ -68,6 +68,7 @@ namespace IceCreamShopRestApi.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
model.ShopIceCreams = null!;
|
||||
return _logic.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Loading…
x
Reference in New Issue
Block a user