public ActionResult DeleteConfirmed(int id)
        {
            naturePlace naturePlace = db.naturePlaces.Find(id);

            db.naturePlaces.Remove(naturePlace);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,placeName,address,imagePicture,url,sportSuggestions,Tag,Detail")] naturePlace naturePlace)
 {
     if (ModelState.IsValid)
     {
         db.Entry(naturePlace).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(naturePlace));
 }
        public ActionResult Create([Bind(Include = "Id,placeName,address,imagePicture,url,sportSuggestions,Tag,Detail")] naturePlace naturePlace)
        {
            if (ModelState.IsValid)
            {
                db.naturePlaces.Add(naturePlace);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(naturePlace));
        }
        // GET: naturePlaces/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            naturePlace naturePlace = db.naturePlaces.Find(id);

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