public ActionResult Edit(LedgerViewModel ledger) { if (ModelState.IsValid) { _ledgerService.Edit(new AccountBook { Id = ledger.Id, Categoryyy = (int)ledger.LedgerType, Amounttt = ledger.Amount, Dateee = ledger.Date, Remarkkk = ledger.Remark }); _ledgerService.Save(); return(RedirectToAction("Index")); } return(View(ledger)); }