public ActionResult <Planet> GetPlanet(string id)
 {
     try
     {
         var planet = planetLogic.GetPlanet(id);
         return(Ok(planet));
     }
     catch (Exception ex)
     {
         return(StatusCode(500, $"Internal server error : {ex}"));
     }
 }
Beispiel #2
0
 public IActionResult UpdatePlanet(string id)
 {
     return(View(nameof(UpdatePlanet), planetLogic.GetPlanet(id)));
 }