public ActionResult Edit(int id) { var ledger = _ledgerService.FindById(id); ViewBag.ledgerTypes = new SelectList(_ledgerTypeService.GetAllLedgerType().OrderBy(l => l.Name), "LedgerTypeID", "Name", ledger.LedgerTypeID); return(View(ledger)); }