public async Task <ActionResult> CreateCity(string cityName) { if (!string.IsNullOrEmpty(cityName)) { rep.Add(new City() { Name = cityName }); await Task.Run(() => rep.Save()); return(Created("restaurants", cityName)); } else { return(BadRequest()); } }