public ActionResult DeleteConfirmed(int id)
        {
            MatchSpecificTip matchSpecificTip = db.MatchSpecificTips.Find(id);

            db.MatchSpecificTips.Remove(matchSpecificTip);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Tip,SendTime,Expiration")] MatchSpecificTip matchSpecificTip)
 {
     if (ModelState.IsValid)
     {
         db.Entry(matchSpecificTip).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(matchSpecificTip));
 }
        public ActionResult Create([Bind(Include = "Id,Tip,SendTime,Expiration")] MatchSpecificTip matchSpecificTip)
        {
            if (ModelState.IsValid)
            {
                db.MatchSpecificTips.Add(matchSpecificTip);
                db.SaveChanges();
                BackgroundJob.Schedule(() => Jobs.ScheduleMatchSpecificTip(matchSpecificTip.Id), matchSpecificTip.SendTime);
                return(RedirectToAction("Index"));
            }

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

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