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