без ошибки и ладно

This commit is contained in:
Allllen4a 2024-05-29 20:19:25 +04:00
parent 6841d9ec5a
commit e88eecaf97
2 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@ namespace BeautySalonDatabaseImplement.Implements
}
cosmetic.Update(model);
context.SaveChanges();
cosmetic.UpdateProcedure(context, model);
cosmetic.UpdateProcedures(context, model);
transaction.Commit();
return cosmetic.GetViewModel;
}

View File

@ -34,15 +34,15 @@ namespace BeautySalonDatabaseImplement.Models
private Dictionary<int, (IProcedureModel, int)>? _procedureCosmetics = null;//Это поле для хранения словаря OrderCosmetics.
[NotMapped]
public Dictionary<int, (IProcedureModel, int)> ProcedureCosmetic//представляет список косметики, участвующей в заказе. Не присутствует в базе данных.
public Dictionary<int, (IProcedureModel, int)> ProcedureCosmetic
{
get
{
if (_procedureCosmetics == null)
{
_procedureCosmetics = Procedures
.ToDictionary(recPC => recPC.ProcedureId, recPC =>
(recPC.Procedure as ICosmeticModel, recPC.Count));
.ToDictionary(recPC => recPC.ProcedureId, recPC =>
((IProcedureModel)recPC.Procedure, recPC.Count));
}
return _procedureCosmetics;
}