Compare commits

..

No commits in common. "ca1e5c73beacb1832266bcb6932eddb318a1a23a" and "d3c3de404709f66e259bc2838c36ec420024ac36" have entirely different histories.

View File

@ -79,17 +79,14 @@ namespace LawFirmDatabaseImplement.Implements
using var transaction = context.Database.BeginTransaction();
try
{
var shop = context.Shops.Include(x => x.Documents).FirstOrDefault(x => x.Id == model.Id);
var shop = context.Shops.FirstOrDefault(x => x.Id == model.Id);
if (shop == null)
{
return null;
}
shop.Update(model);
context.SaveChanges();
if (model.ShopDocuments.Count > 0)
{
shop.UpdateDocuments(context, model);
}
shop.UpdateDocuments(context, model);
transaction.Commit();
return shop.GetViewModel;
}