public IActionResult UpdatePlanet(string id, [FromBody] Planet planet) { try { planetLogic.UpdatePlanet(id, planet); return(Ok()); } catch (Exception ex) { return(StatusCode(500, $"Internal server error : {ex}")); } }
public IActionResult UpdatePlanet(Planet p) { planetLogic.UpdatePlanet(p.PlanetID, p); return(View(nameof(ListPlanet), planetLogic.PlanetToStar(p.StarID))); }