public async Task <IActionResult> Delete(int id) { try { if (await PersonaDominio.ObtenerPersonaAsync(id) == null) { return(NotFound()); } await PersonaDominio.EliminarPersonaAsync(id); return(NoContent()); } catch (DatosInvalidosException ex) { return(BadRequest(Errores.GetModelStateErrores(ex.Data))); } catch { return(StatusCode(500)); } }