public async Task <IActionResult> Delete(int id) { try { var deleteHistorico = await _service.Delete(id); return(Ok(deleteHistorico)); } catch (NotFoundException e) { return(this.StatusCode(StatusCodes.Status404NotFound, $"${e.Message}")); } catch (ArgumentException e) { return(this.StatusCode(StatusCodes.Status500InternalServerError, $"${e.Message}")); } }
public void Delete(int id) { _historicoService.Delete(id); }