public IActionResult DeleteCity(int id, bool includePointsOfInterest = true) { var cityToDelete = _repository.GetCity(id, includePointsOfInterest); if (cityToDelete == null) { return(NotFound()); } _repository.DeleteCity(cityToDelete); return(Ok(cityToDelete)); }
public ActionResult UpdateCity(int id) { CityModel currentCity = citiesRepository.GetById(id); if (currentCity is null) { return(NotFound()); } citiesRepository.DeleteCity(id); return(NoContent()); }
public IActionResult Delete(string cityName) { _citiesRepository.DeleteCity(cityName); return(Ok()); }