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