public ActionResult Create(SavingsAccount savingsaccount) { savingsaccount.SetNextAccountNumber(); if (ModelState.IsValid) { db.SavingsAccounts.Add(savingsaccount); db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.ClientId = new SelectList(db.Clients, "ClientId", "FullName", savingsaccount.ClientId); ViewBag.AccountStatusId = new SelectList(db.AccountStatuses, "AccountStatusId", "Description", savingsaccount.AccountStatusId); return View(savingsaccount); }