public FanFavViewModel SelectFanFavPlanets(int fanId) { FanId = fanId; var dalFavPlanets = _favPlanetStore.SelectFanFavPlanets(FanId); var fanResults = _fanService.GetFanInfo(FanId); var favPlanets = new List <FavPlanet>(); var fanFavViewModel = new FanFavViewModel(); fanFavViewModel.FanName = fanResults.FanName; fanFavViewModel.FanId = fanResults.FanId; foreach (var dalFavPlanet in dalFavPlanets) { var favPlanet = new FavPlanet(); favPlanet.FanId = dalFavPlanet.FanId; favPlanet.PlanetUrl = dalFavPlanet.PlanetUrl; favPlanets.Add(favPlanet); } fanFavViewModel.FavPlanets = favPlanets; return(fanFavViewModel); }