без ошибки и ладно
This commit is contained in:
parent
6841d9ec5a
commit
e88eecaf97
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user