public IActionResult CreateTeam()
        {
            CreatePokemonTeamViewModel model = new CreatePokemonTeamViewModel()
            {
                AllGames = this.dataService.GetObjects <Game>("ReleaseDate, Id").Where(x => x.ReleaseDate <= DateTime.Now).ToList(),
                UserId   = this.dataService.GetObjectByPropertyValue <User>("Username", this.User.Identity.Name).Id,
            };

            return(this.View(model));
        }
        public IActionResult CreateTeam(CreatePokemonTeamViewModel pokemonTeam)
        {
            if (!this.ModelState.IsValid)
            {
                CreatePokemonTeamViewModel model = new CreatePokemonTeamViewModel()
                {
                    AllGames = this.dataService.GetObjects <Game>("ReleaseDate, Id").Where(x => x.ReleaseDate <= DateTime.Now).ToList(),
                    UserId   = this.dataService.GetObjectByPropertyValue <User>("Username", this.User.Identity.Name).Id,
                };

                return(this.View(model));
            }

            this.dataService.AddPokemonTeam(pokemonTeam);

            return(this.RedirectToAction("PokemonTeams", "User"));
        }