diff --git a/BeautySalonView/BeautySalonDatabaseImplement/Models/Service.cs b/BeautySalonView/BeautySalonDatabaseImplement/Models/Service.cs index a4b6b29..3832078 100644 --- a/BeautySalonView/BeautySalonDatabaseImplement/Models/Service.cs +++ b/BeautySalonView/BeautySalonDatabaseImplement/Models/Service.cs @@ -58,22 +58,20 @@ namespace BeautySalonDatabaseImplement.Models Id = model.Id, ServiceName = model.ServiceName, ServicePrice = model.ServicePrice, - Cosmetics = model.ServiceCosmetics.Select(x => new ServiceCosmetic() + Cosmetics = model.ServiceCosmetics.Select(x => new CosmeticProcedure() { Cosmetic = context.Cosmetics.First(y => y.Id == x.Cosmetic.Id), - ServiceCosmeticCount = x.Count + ProcedureCosmeticCount = x.Count }).ToList(), - DateCreate = model.DateCreate, - LaborCostsId = model.LaborCostsId, - LaborCostsId = model.LaborCostsId - }; + StaffMemberId = model.StaffMemberId + }; } public void Update(ServiceBindingModel model) { ServiceName = model.ServiceName; ServicePrice = model.ServicePrice; - LaborCostsId = model.LaborCostsId; + StaffMemberId = model.StaffMemberId; } public ServiceViewModel GetViewModel => new() @@ -82,8 +80,7 @@ namespace BeautySalonDatabaseImplement.Models ServiceName = ServiceName, ServicePrice = ServicePrice, ServiceCosmetics = ServiceCosmetics, - DateCreate = DateCreate, - LaborCostsId = LaborCostsId, + StaffMemberId = StaffMemberId, }; public void UpdateCosmetics(BeautySalonDatabase context, ServiceBindingModel model)