public async Task <TransmissionDto> UpdateTransmissionAsync(UpdateTransmissionRequest request) { var transmission = await GetByIdAsync(request.Id); // validation of request var transmissionToUpdate = Mapper.Map <UpdateTransmissionRequest, Transmission>(request, transmission); transmission = await UpdateAsync(transmissionToUpdate); return(Mapper.Map <Transmission, TransmissionDetailsDto>(transmission)); }
public async Task <TransmissionDto> UpdateTransmission([FromBody] UpdateTransmissionRequest request) { return(await this.transmissionService.UpdateTransmissionAsync(request)); }