public ActionResult DeleteConfirmed(int id)
        {
            APIEventGame aPIEventGame = db.APIEventGames.Find(id);

            db.APIEventGames.Remove(aPIEventGame);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult APIGame([Bind(Include = "ID,EventID,GameID,GameName")] APIEventGame aPIEventGame)
 {
     aPIEventGame.Event = db.Events.Find(aPIEventGame.EventID);
     aPIEventGame.GameID.ToString();
     db.APIEventGames.Add(aPIEventGame);
     db.SaveChanges();
     return(RedirectToAction("Details", "Events", new { id = aPIEventGame.EventID }));
 }
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            APIEventGame aPIEventGame = db.APIEventGames.Find(id);

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