Пример #1
0
        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());
        }
Пример #2
0
 public async Task UpdateAsync(UpdateSignatureDTO signatureDto)
 {
     var signature = _mapper.Map <School.Domain.Signature>(signatureDto);
     await _repository.UpdateAsync(signature);
 }