public virtual async Task <ActionResult> Edit(TransactionTypeEditViewModel model) { if (!ModelState.IsValid) { return(View(model)); } model.CreatorID = await GetCurrentUserIdAsync(); _transactionTypeService.EditTransactionType(model); return(RedirectToAction(MVC.Home.ActionNames.Index, MVC.Home.Name)); }
public ActionResult EditTransactionType([FromBody] TransactionType inputs) { try { _serv.EditTransactionType(inputs); return(Ok()); } catch (Exception ex) { return(BadRequest($"Ocorreu um erro ao Edit o TransactionType {inputs.Id}: {ex.Message}")); } }