public ActionResult DeleteConfirmed(int id) { toter toter = db.toters.Find(id); db.toters.Remove(toter); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,NomeCompleto,Nacionalidade,Cidade,ReleaseDate,Telefone,Email")] toter toter) { if (ModelState.IsValid) { db.Entry(toter).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(toter)); }
public ActionResult Create([Bind(Include = "Id,NomeCompleto,Nacionalidade,Cidade,ReleaseDate,Telefone,Email")] toter toter) { if (ModelState.IsValid) { db.toters.Add(toter); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(toter)); }
// GET: toters/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } toter toter = db.toters.Find(id); if (toter == null) { return(HttpNotFound()); } return(View(toter)); }