// GET: AmenityComplaints/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AmenityComplaint amenityComplaint = db.AmenityComplaint.Find(id); if (amenityComplaint == null) { return(HttpNotFound()); } ViewBag.amenityID = new SelectList(db.RoomAmenity, "amenityID", "amenityID", amenityComplaint.amenityID); return(View(amenityComplaint)); }