// 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(); }
//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)); }