public ActionResult Create(Loan loan)
        {
            if (ModelState.IsValid)
            {
                db.Loans.Add(loan);
                db.SaveChanges();
                return RedirectToAction("Index", new { id = loan.CustomerId });
            }

            return View(loan);
        }
 public ActionResult Edit(Loan loan)
 {
     if (ModelState.IsValid)
     {
         db.Entry(loan).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index", new { id = loan.CustomerId });
     }
     return View(loan);
 }