public ActionResult Edit(UserClub userclub) { if (ModelState.IsValid) { db.Entry(userclub).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(userclub); }
public ActionResult Create(UserClub userclub) { if (ModelState.IsValid) { userclub.UserName = User.Identity.Name; db.UserClubs.Add(userclub); db.SaveChanges(); return RedirectToAction("Index"); } return View(userclub); }