public ActionResult Edit([Bind(Include = "TeamId,TeamName,City,Province,PlayerId,country")] Team team) { if (ModelState.IsValid) { db.Entry(team).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(team)); }
public ActionResult Edit([Bind(Include = "PlayerId,FirstName,LastName,Position")] Player player) { if (ModelState.IsValid) { db.Entry(player).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(player)); }
public ActionResult Edit([Bind(Include = "Id,Name,TeamId,PlayerId")] Country country) { if (ModelState.IsValid) { db.Entry(country).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(country)); }
public ActionResult Edit([Bind(Include = "PlayerId,FirstName,LastName,Position,TeamName")] Player player) { if (ModelState.IsValid) { db.Entry(player).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.TeamName = new SelectList(db.Teams, "TeamName", "City", player.TeamName); return(View(player)); }
public void Edit(TEntity entity) { context.Entry(entity).State = EntityState.Modified; }