Esempio n. 1
0
        public ActionResult Create([Bind(Include = "Title,Icon,SortOrder,Publish")] TourOption tourOption)
        {
            db.TourOptions.Add(tourOption);
            db.SaveChanges();

            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,Title,Icon,SortOrder,Publish")] TourOption tourOption)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tourOption).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
     return(RedirectToAction("Index"));
 }