public IActionResult Create(City city) { try { services.CreateCity(city); return(RedirectToAction("Index")); } catch (Exception ex) { ViewBag.Msg = ex.Message; } return(View()); }
// POST api/city public int Post([FromBody] CityEntity cityEntity) { return(_cityServices.CreateCity(cityEntity)); }