public ActionResult Delete(CountryRowModel[] model) { foreach (var item in model) { var obj = _countryService.Find(item.Id); _countryService.Delete(obj); } return AjaxForm().ReloadPage(); }
public ActionResult Delete(CountryRowModel[] model) { var data = new JsonResultData(ModelState); data.RunWithTry(_ => { foreach (var item in model) { var obj = _countryService.GetById(item.Id); _countryService.Delete(obj); } data.ReloadPage = true; }); return Json(data); }