// Sets homePlanet obj with planet of specific character! private void GrabPlanet() { Repository <Planet> planetRepo = new Repository <Planet>(); var idNum = api.getURLId(swChar.Homeworld); homePlanet = planetRepo.GetById(idNum); }
//TODO: Make function to grab names add to cellection. public void AddResidentNames(Planet planet) { //TODO: Clear Resident collection out and add name to string collection if (planet.Residents != null) { foreach (var link in planet.Residents) { int tempUrlID = api.getURLId(link); var resident = planetPersonRepo.GetById(tempUrlID); PlanetResidentNames.Add(resident.Name); } } else { planet.Residents.Clear(); planet.Residents.Add("None"); } }