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