public Game Get(int GameID)
        {
            Game                Game           = new Game();
            GameDTO             GameDTO        = new GameDTO();
            GamesDataController DataController = new GamesDataController();

            GameDTO = DataController.GetGameByID(GameID);

            Game.GameID   = GameDTO.GameID;
            Game.GameName = GameDTO.GameName;

            return(Game);
        }
        public async Task <bool> PostNewSets(int GameID)
        {
            bool Success;
            SetDataController SetDataController = new SetDataController();

            List <YgoSetAPIResponse>  YgoSetResponse     = new List <YgoSetAPIResponse>();
            PokemonSetAPIResponseRoot PokemonSetResponse = new PokemonSetAPIResponseRoot();
            List <SetDTO>             NonExistingSets    = new List <SetDTO>();
            List <SetDTO>             ExistingSets       = new List <SetDTO>();

            GamesDataController GameDataController = new GamesDataController();
            GameDTO             GameDTO            = GameDataController.GetGameByID(GameID);
            CardController      CardController     = new CardController();

            using (var HttpClient = new HttpClient())
            {
                switch (GameDTO.GameName)
                {
                case "Yu-Gi-Oh":
                    using (var Response = await HttpClient.GetAsync("https://db.ygoprodeck.com/api/v7/cardsets.php"))
                    {
                        string ApiResponse = await Response.Content.ReadAsStringAsync();

                        YgoSetResponse = JsonConvert.DeserializeObject <List <YgoSetAPIResponse> >(ApiResponse);
                    }

                    foreach (var Item in YgoSetResponse)
                    {
                        SetDTO NewSet = new SetDTO();

                        NewSet.GameID      = GameID;
                        NewSet.SetCode     = Item.set_code;
                        NewSet.SetName     = Item.set_name;
                        NewSet.ReleaseDate = Item.tcg_date;

                        NonExistingSets.Add(NewSet);
                    }

                    break;

                case "Pokemon":
                    using (var Response = await HttpClient.GetAsync("https://api.pokemontcg.io/v1/sets"))
                    {
                        string ApiResponse = await Response.Content.ReadAsStringAsync();

                        PokemonSetResponse = JsonConvert.DeserializeObject <PokemonSetAPIResponseRoot>(ApiResponse);
                    }
                    foreach (var Item in PokemonSetResponse.sets)
                    {
                        SetDTO NewSet = new SetDTO();
                        NewSet.GameID      = GameID;
                        NewSet.SetCode     = Item.code;
                        NewSet.SetName     = Item.name;
                        NewSet.ReleaseDate = Item.releaseDate;

                        NonExistingSets.Add(NewSet);
                    }
                    break;
                }
            }

            ExistingSets = SetDataController.GetSetsByGame(GameID);

            HashSet <string> SetCodes = new HashSet <string>(ExistingSets.Select(x => x.SetCode));

            NonExistingSets.RemoveAll(x => SetCodes.Contains(x.SetCode));

            if (NonExistingSets.Count == 0 || NonExistingSets == null)
            {
                Success = false;
            }
            else
            {
                int SetID;

                foreach (var Set in NonExistingSets)
                {
                    SetID = SetDataController.AddNonExistingSetsToDataBase(Set);

                    switch (GameDTO.GameName)
                    {
                    case "Yu-Gi-Oh":
                        await CardController.AddYugiohCards(SetID, Set.SetName, Set.SetCode);

                        break;

                    case "Pokemon":
                        await CardController.AddPokemonCards(SetID, Set.SetCode);

                        break;
                    }
                }
                Success = true;
            }

            return(Success);
        }