public IActionResult UpdateExpense(ExpenseDetailViewModel updatedExpense)
 {
     if (ModelState.IsValid)
     {
         var expense = new ExpenseDetail()
         {
             ItemId      = updatedExpense.ItemId,
             StoreName   = updatedExpense.StoreName,
             ItemName    = updatedExpense.ItemName,
             Amount      = updatedExpense.Amount,
             ExpenseDate = updatedExpense.ExpenseDate,
             Category    = updatedExpense.Category
         };
         _theExpenseSystem.UpdateEachExpense(expense);
         return(RedirectToAction("ViewExpense"));
     }
     else
     {
         ViewBag.IsEditing = true;
         return(View("Form", updatedExpense));
     }
 }
 public string UpdateExpense(Guid id, Double amount)
 {
     _theExpenseSystem.UpdateEachExpense(id, amount);
     return("expense updated successfully");
 }