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