сижу с услугой

This commit is contained in:
Milana Ievlewa 2024-04-30 14:59:11 +03:00
parent 7874978020
commit 13760e8bf9

View File

@ -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)