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