корректировка расчета стоимости работы в заказе

This commit is contained in:
Мк Игорь 2023-04-08 19:35:46 +04:00
parent b439a33cd2
commit 9bf936c717

View File

@ -33,7 +33,7 @@ namespace CarServiceDatabase.Models
return new()
{
Count = model.Count,
Cost = model.Cost,
Cost = context.Works.First(x => x.Id == model.WorkId).Price * model.Count,
RepairRequestId = model.RepairRequestId,
Work = context.Works.First(x => x.Id == model.WorkId)
};
@ -45,7 +45,7 @@ namespace CarServiceDatabase.Models
return;
}
Count = model.Count;
Cost = model.Cost;
Cost = context.Works.First(x => x.Id == model.WorkId).Price * model.Count;
RepairRequestId = model.RepairRequestId;
Work = context.Works.First(x => x.Id == model.WorkId);
}