Example #1
0
        public async Task <IActionResult> DeleteTransactionType(int id)
        {
            try
            {
                await _transactionTypeService.DeleteTransactionType(id);

                return(Ok());
            }
            catch (Exception)
            {
                return(NotFound());
            }
        }
        public ActionResult DeleteTransactionType([FromRoute] Guid IdTransactionType)
        {
            try
            {
                _serv.DeleteTransactionType(IdTransactionType);

                return(Ok());
            }
            catch (Exception ex)
            {
                return(BadRequest($"Ocorreu um erro ao Delete o TransactionType {IdTransactionType}: {ex.Message}"));
            }
        }
 public virtual ActionResult PostDelete(int id)
 {
     _transactionTypeService.DeleteTransactionType(id);
     return(RedirectToAction(MVC.Home.ActionNames.Index, MVC.Home.Name));
 }