Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 // GET: Author/Delete/5
 public ActionResult Delete(int id)
 {
     AuthorsModel.Delete(id);
     return(RedirectToAction("Index"));
 }