Exemplo n.º 1
0
        public ViewResult Index()
        {
            var session = new OlympicSession(HttpContext.Session);
            var model   = new CountryListViewModel
            {
                ActiveGame = session.GetActiveGame(),
                ActiveCat  = session.GetActiveCat(),
                Countries  = session.GetMyCountries()
            };

            return(View(model));
        }
Exemplo n.º 2
0
        public RedirectToActionResult Delete()
        {
            var session = new OlympicSession(HttpContext.Session);

            session.RemoveMyCountries();

            TempData["message"] = "Favorite countries cleared";

            return(RedirectToAction("Index", "Country",
                                    new
            {
                ActiveGame = session.GetActiveGame(),
                ActiveCat = session.GetActiveCat()
            }));
        }