public ActionResult Create([Bind(Include = "Title,Icon,SortOrder,Publish")] TourOption tourOption) { db.TourOptions.Add(tourOption); db.SaveChanges(); return(RedirectToAction("Index")); }
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")); }