public ActionResult Create(UserProfileModel userprofile)
        {
            if (ModelState.IsValid)
            {
                db.UserProfiles.Add(userprofile);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(userprofile);
        }
 public ActionResult Edit(UserProfileModel userprofile)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userprofile).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(userprofile);
 }