Esempio n. 1
0
        public IEnumerable <IndividualWeatherEntryViewModel> GetAllFavorites(string userCode)
        {
            //cheating new to Castle Windsor.
            var fav = new FavoritesService();

            var request = new UserFavoritesApiRequest {
                UserCode = userCode, WeathermanEntities = _db
            };


            var response = fav.GetUserFavoritesApiRequest(request);

            if (response.Success)
            {
                return(response.IndividualWeatherEntryViewModels);
            }

            return(new List <IndividualWeatherEntryViewModel>());
        }