public async Task <IActionResult> UpdateSample(Guid sampleId, SampleForUpdateDto sample) { // add error handling var command = new UpdateSampleCommand(sampleId, sample); await _mediator.Send(command); return(NoContent()); }
public bool Put(UpdateSampleCommand sample) { Validate(sample, new UpdateSampleValidator()); return(_sampleRepository.Update(_mapper.Map <Sample>(sample))); }