//
 // GET: /User/Create
 public ActionResult Create()
 {
     var model = new UserDetail
     {
         ProjectDetail = db1.ProjectDetails.ToList()
     };
     return View(model);
 }
        public ActionResult Create(UserDetail userdetail)
        {
            if (ModelState.IsValid)
            {
                db.UserDetails.Add(userdetail);
                db.SaveChanges();
                return RedirectToAction("SearchCust");
            }

            return View(userdetail);
        }
 public ActionResult Edit(UserDetail userdetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userdetail).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("SearchCust");
     }
     return View(userdetail);
 }