public ActionResult Edit([Bind(Include = "ID,UseSyncromatics")] AppSettings appSettings) { if (ModelState.IsValid) { using (var db = new TrolleyTrackerContext()) { db.Entry(appSettings).State = EntityState.Modified; db.SaveChanges(); AppSettingsInterface.UpdateSettings(appSettings); return(RedirectToAction("Index")); } } return(View(appSettings)); }
public ActionResult Create([Bind(Include = "ID,UseSyncromatics")] AppSettings appSettings) { if (ModelState.IsValid) { using (var db = new TrolleyTrackerContext()) { db.AppSettings.Add(appSettings); db.SaveChanges(); } AppSettingsInterface.UpdateSettings(appSettings); return(RedirectToAction("Index")); } return(View(appSettings)); }