public ActionResult Index(FormCollection form) { try { if (form["btnDelete"] != null) { var personValues = form.GetValues("chkDelete"); if (personValues != null) { foreach (var personValue in personValues) { var personId = Convert.ToInt32(personValue); personProvider.DeletePerson(personId); } } } } catch (Exception ex) { HandleException(ex); } return(RedirectToAction("Index")); }
public virtual long DeletePerson([FromBody] Person person) { return(PersonProvider.DeletePerson(person)); }