public IActionResult GetById(int id) { try { return(Ok(_citiesService.Get(id))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <IEnumerable <City> > Get() { try { return(Ok(_service.Get())); } catch (System.Exception error) { return(BadRequest(error.Message)); } }