public ActionResult ApplyForLoan(LoanRequestViewModel model) { CommonDAL objCommonDal = new CommonDAL(); CustomerDAL objCustomerDal = new CustomerDAL(); ViewBag.cityList = objCommonDal.GetCityList(); @ViewBag.loanTypeList = new List<SelectListItem>() { new SelectListItem(){Text = "Personal",Value="P"}, new SelectListItem(){Text = "Home",Value="H"}, new SelectListItem(){Text = "Vehicle",Value="V"}, }; if(objCustomerDal.AddLoanAccountRequest(model) ) { ModelState.AddModelError("", "You request for loan was successful. You may apply for yet another loan"); } else { ModelState.AddModelError("", "Operation failed"); } return View(model); }