Exemplo n.º 1
0
        public ActionResult UpdateCity([DataSourceRequest] DataSourceRequest request, City city)
        {
            if (city != null && ModelState.IsValid)
            {
                DataProvider.Update(city);
            }

            return Json(new[] { city }.ToDataSourceResult(request, ModelState));
        }
Exemplo n.º 2
0
        public ActionResult DeleteCity([DataSourceRequest] DataSourceRequest request, City city)
        {
            if (city != null)
            {
                DataProvider.Delete(city);
            }

            return Json(new[] { city }.ToDataSourceResult(request, ModelState));
        }