public IActionResult Edit(Expense expense) { if (ModelState.IsValid) { _expenseRepository.EditExpense(expense); return(RedirectToAction(nameof(Index))); } return(View(expense)); }
public ActionResult Edit(int id, [Bind("Id,Name,Payee,Amount")] Expense expense) { if (id != expense.Id) { return(NotFound()); } if (ModelState.IsValid) { _expenseRepository.EditExpense(expense); return(RedirectToAction(nameof(Index))); } return(View(expense)); }
public Task EditExpenseAsync(ExpenseDto expense) { //TODO : Charges should be recalculate after a change in expense return(_expenseRepository.EditExpense(expense)); }
public ActionResult <Expense> EditExpense(int id, AddExpense addExpense) { _expenseRepository.EditExpense(id, addExpense); return(Ok()); }