public ActionResult UpdateCity([DataSourceRequest] DataSourceRequest request, City city) { if (city != null && ModelState.IsValid) { DataProvider.Update(city); } return Json(new[] { city }.ToDataSourceResult(request, ModelState)); }
public ActionResult DeleteCity([DataSourceRequest] DataSourceRequest request, City city) { if (city != null) { DataProvider.Delete(city); } return Json(new[] { city }.ToDataSourceResult(request, ModelState)); }