public ActionResult Apagar(int id) { if (LoginController.retorno == true) { repository.Apagar(id); return(RedirectToAction("Index")); } else { return(Redirect("/login")); } }
public ActionResult Apagar(int id) { repository.Apagar(id); return(RedirectToAction("Index")); }
public JsonResult Apagar(int id) { bool apagou = repository.Apagar(id); return(Json(new { status = apagou }, JsonRequestBehavior.AllowGet)); }