public async Task <OutManufacturingPlanDTO> UpdateManufacturingPlanAsync(int id, InManufacturingPlanDTO inManufacturingPlanDto) { var manufacturingPlan = ManufacturingPlanMapping.InDtoToManufacturingPlan(inManufacturingPlanDto); manufacturingPlan.Id = id; var updatedManufacturingPlan = await _manufacturingPlanRepository.Update(manufacturingPlan); return(ManufacturingPlanMapping.ManufacturingPlanToOutDto(updatedManufacturingPlan)); }
public ActionResult PutManufacturingPlan(ManufacturingPlanDTO manufacturingPlanDTO) { List <OperationsMDP> list = new List <OperationsMDP>(); foreach (int item in manufacturingPlanDTO.Operactions) { list.Add(_IOperationRepository.Select(item)); } ManufacturingPlan manufacturing = new ManufacturingPlan(manufacturingPlanDTO.Date, list); return(Ok(_IManufacturingPlanRepository.Update(manufacturing))); }