public ActionResult DeleteConfirmed(int id)
        {
            OutcomeVote outcomeVote = db.OutcomeVotes.Find(id);

            db.OutcomeVotes.Remove(outcomeVote);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,VoterId,OutcomeId")] OutcomeVote outcomeVote)
 {
     if (ModelState.IsValid)
     {
         db.Entry(outcomeVote).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(outcomeVote));
 }
        public ActionResult Create([Bind(Include = "Id,VoterId,OutcomeId")] OutcomeVote outcomeVote)
        {
            if (ModelState.IsValid)
            {
                db.OutcomeVotes.Add(outcomeVote);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(outcomeVote));
        }
        // GET: OutcomeVotes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OutcomeVote outcomeVote = db.OutcomeVotes.Find(id);

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