public ActionResult Delete(string articles, string returnUrl) { var idArray = articles.Split(',') .Where(a => !string.IsNullOrEmpty(a)) .Select(a => a.ToInt32()).Distinct(); foreach (var id in idArray) { var article = jlService.GetArticle(id); if (article != null) { jlService.DeleteArticle(article); } } if (Url.IsLocalUrl(returnUrl)) { return(Redirect(returnUrl)); } return(RedirectToAction("index")); }