Example #1
0
        public ActionResult Create()
        {
            User loggedInUser = (User)Session["LoggedInUser"];

            UpcomingMatch match = (UpcomingMatch)Session["SelectedMatch"];

            bool betExists = betservice.CheckIfBetExists(match.MatchID, loggedInUser.UserID);

            if (betExists == false)
            {
                BetViewModel newbet = new BetViewModel
                {
                    Match = match
                };

                return(View(newbet));
            }
            else
            {
                return(RedirectToAction("UpcomingMatches", "Match"));
            }
        }