public IActionResult Put(string cityName, [FromBody] CityViewModel city) { if (!ModelState.IsValid) { return(BadRequest()); } _citiesRepository.EditCity(city); return(Ok()); }
public IActionResult Put(string cityName, [FromBody] CityViewModel cityViewModel) { if (!ModelState.IsValid) { return(BadRequest()); } var city = new City(); city.InjectFrom(cityViewModel); _citiesRepository.EditCity(city); return(Ok()); }