public IActionResult Get(string name) { PlanetModel planet = repo.GetPlanetByName(name); if (planet == null) { return(NotFound()); } return(Ok(jconv.Convert(planet))); }
public IActionResult Get(string name) { SolarSystemModel solarSystem = repo.GetSolarSystemByName(name); if (solarSystem == null) { return(NotFound()); } return(Ok(jconv.Convert(solarSystem))); }
public IActionResult Get(string name) { StarModel star = repo.GetStarByName(name); if (star == null) { return(NotFound()); } return(Ok(jconv.Convert(star))); }
public IActionResult Get(string name) { ConstellationModel constellation = repo.GetConstellationByName(name); if (constellation == null) { return(NotFound()); } return(Ok(jconv.Convert(constellation))); }
public void PlanetConvert() { Console.WriteLine("Planet Convert Test:"); PlanetModel bigDipper = repo.GetPlanetByName("Neptune"); List <ConstellationModel> constellations = repo.GetAllConstellations(); JSONConvert jconv = new JSONConvert(); Console.WriteLine(jconv.Convert(bigDipper)); Console.WriteLine(jconv.Convert(constellations)); }
public void ConstellationConvert() { Console.WriteLine("Constellation Convert Test:"); ConstellationModel bigDipper = repo.GetConstellationByName("Ursa Major"); List <ConstellationModel> constellations = repo.GetAllConstellations(); JSONConvert jconv = new JSONConvert(); Console.WriteLine(jconv.Convert(bigDipper)); Console.WriteLine(jconv.Convert(constellations)); }
public void StarConvert() { Console.WriteLine("JSON Star Convert Test"); JSONConvert jconv = new JSONConvert(); StarModel star = repo.GetStarByName("Dubhe"); List <StarModel> stars = repo.GetAllStars(); Console.WriteLine(jconv.Convert(star)); Console.WriteLine(jconv.Convert(stars)); }