public async Task <IActionResult> ActualizarActor(Autor autor) { var name = await _autorService.Actualizar(autor); Log.EscribirLog("Se reliza Actualiza del auto" + name.Nombre); return(Ok(name)); }
public async Task <IActionResult> Actualizar([FromBody] AutorModel autor) { try { if (ModelState.IsValid) { var result = await _service.Actualizar(AutorConvert.toEntity(autor)); return(Ok(AutorConvert.toModel(result))); } else { return(BadRequest(ModelState)); } } catch (Exception e) { return(BadRequest(e.Message)); throw e; } }