コード例 #1
0
        // Read all city IDs from file into list
        private void populateFavouriteCityIds()
        {
            favCityIds = new List <int>();

            //Gets all users favourites
            favCityIds = DataUtilities.GetFavouriteCityIDsFromDB(user.Username);
            Console.WriteLine();
        }
コード例 #2
0
 //Check IDs in file and see if the specified ID is already in the file
 private bool alreadyFavourite(int id)
 {
     return(DataUtilities.GetFavouriteCityIDsFromDB(user.Username).Any(_id => _id == id));
 }