public async Task <IActionResult> Put(long id, [FromBody] DobrasCutaneasInputDTO inputDTO) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { var dobrasCutaneas = new DobrasCutaneas(inputDTO.Triciptal, inputDTO.Subescapular, inputDTO.Biciptal, inputDTO.AxilarMedia, inputDTO.SupraIliaca, inputDTO.Toracica, inputDTO.Coxa, inputDTO.Abdominal, inputDTO.PanturrilhaMedial, inputDTO.AlunoId); dobrasCutaneas.Id = id; var result = await _service.Put(dobrasCutaneas); if (result != null) { return(Ok(result)); } else { return(BadRequest()); } } catch (ArgumentException e) { return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message)); } }
public async Task <DobrasCutaneas> Put(DobrasCutaneas dobrasCutaneas) { return(await _repository.UpdateAsync(dobrasCutaneas)); }
public async Task <DobrasCutaneas> Post(DobrasCutaneas dobrasCutaneas) { return(await _repository.InsertAsync(dobrasCutaneas)); }