public ActionResult DeleteConfirmed(int id)
        {
            RentalSurvey rentalSurvey = db.RentalSurveys.Find(id);

            db.RentalSurveys.Remove(rentalSurvey);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "SurveyID,RecommendRentalRating,RentalCost,ExperienceRating,Feedback")] RentalSurvey rentalSurvey)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rentalSurvey).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(rentalSurvey));
 }
        public ActionResult Create([Bind(Include = "SurveyID,RecommendRentalRating,RentalCost,ExperienceRating,Feedback")] RentalSurvey rentalSurvey)
        {
            if (ModelState.IsValid)
            {
                db.RentalSurveys.Add(rentalSurvey);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(rentalSurvey));
        }
        // GET: Rent/RentalSurveys/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RentalSurvey rentalSurvey = db.RentalSurveys.Find(id);

            if (rentalSurvey == null)
            {
                return(HttpNotFound());
            }
            return(View(rentalSurvey));
        }