示例#1
0
        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}"));
            }
        }
示例#2
0
 public void Delete(int id)
 {
     _historicoService.Delete(id);
 }