public async Task <ActionResult> Put([FromBody] UpdateSignatureDTO signatureDTO) { if (!ModelState.IsValid) { return(BadRequest()); } var signature = await _signatureService.GetAsync(signatureDTO.Id); if (signature != null) { await _signatureService.UpdateAsync(signatureDTO); return(NoContent()); } return(NotFound()); }
public async Task UpdateAsync(UpdateSignatureDTO signatureDto) { var signature = _mapper.Map <School.Domain.Signature>(signatureDto); await _repository.UpdateAsync(signature); }