public async Task <ActionResult <FormaPagamentoViewModel> > Excluir(Guid id) { var formaPagamentoViewModel = await Obter(id); if (formaPagamentoViewModel == null) { return(NotFound()); } await _formaPagamentoService.Remover(id); return(CustomResponse(formaPagamentoViewModel)); }
public async Task <IActionResult> Deletar(string codigo) { try { await _service.Remover(codigo); return(NoContent()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }