diff --git a/BeautySalonView/BeautySalonDatabaseImplement/Implements/CosmeticStorage.cs b/BeautySalonView/BeautySalonDatabaseImplement/Implements/CosmeticStorage.cs index b2a8b4e..7dfa4c0 100644 --- a/BeautySalonView/BeautySalonDatabaseImplement/Implements/CosmeticStorage.cs +++ b/BeautySalonView/BeautySalonDatabaseImplement/Implements/CosmeticStorage.cs @@ -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; } diff --git a/BeautySalonView/BeautySalonDatabaseImplement/Models/Cosmetic.cs b/BeautySalonView/BeautySalonDatabaseImplement/Models/Cosmetic.cs index 3d35d17..40ba2c6 100644 --- a/BeautySalonView/BeautySalonDatabaseImplement/Models/Cosmetic.cs +++ b/BeautySalonView/BeautySalonDatabaseImplement/Models/Cosmetic.cs @@ -34,15 +34,15 @@ namespace BeautySalonDatabaseImplement.Models private Dictionary? _procedureCosmetics = null;//Это поле для хранения словаря OrderCosmetics. [NotMapped] - public Dictionary ProcedureCosmetic//представляет список косметики, участвующей в заказе. Не присутствует в базе данных. + public Dictionary 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; }