public ActionResult Edit(UserProfile profile) { if (ModelState.IsValid) { ups.Update(profile); return RedirectToAction("index"); } return View(profile); }
public void Update(UserProfile item) { dc.Entry(item).State = EntityState.Modified; dc.SaveChanges(); }