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