public ActionResult Reset() { DeviceStoreDataContext db = new DeviceStoreDataContext(); db.DeviceTokens.DeleteAllOnSubmit(db.DeviceTokens.ToList()); db.SubmitChanges(); db.Dispose(); return View("Index"); }
public ActionResult Index(FormCollection collection) { string message = collection["message"]; DeviceStoreDataContext db = new DeviceStoreDataContext(); foreach (var deviceToken in db.DeviceTokens) { MobileNotification.Notify(deviceToken, message); } db.Dispose(); return View(); }