public JsonResult Delete(string[] id) { for (int i = 0; i < id.Length; i++) { try { // TODO: Add delete logic here AuthorsModel.Delete(Convert.ToInt16(id[i])); } catch { //return View(); return(Json(id[i])); } } return(Json(id)); }
// GET: Author/Delete/5 public ActionResult Delete(int id) { AuthorsModel.Delete(id); return(RedirectToAction("Index")); }