Merge branch 'lab3_hard' into lab4_hard

This commit is contained in:
prodigygirl 2023-04-18 16:30:16 +04:00
commit 2569ac535b

View File

@ -160,8 +160,11 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
return null; return null;
} }
shop.Update(model); shop.Update(model);
context.SaveChanges(); if (model.Furnitures.Count > 0)
{
shop.UpdateFurnitures(context, model); shop.UpdateFurnitures(context, model);
}
context.SaveChanges();
transaction.Commit(); transaction.Commit();
return shop.GetViewModel; return shop.GetViewModel;
} }