示例#1
0
        public ActionResult Delete(int id)
        {
            CategoriaRepositorio repositorio = new CategoriaRepositorio();

            repositorio.Apagar(id);
            return(RedirectToAction("Index"));
        }
示例#2
0
        public ActionResult DeleteAjax(int id)
        {
            repositorio.Apagar(id);
            var retorno = new { status = "ok" };
            var json    = JsonConvert.SerializeObject(retorno);

            return(Json(json, JsonRequestBehavior.AllowGet));
        }
 public ActionResult Apagar(int id)
 {
     repositorio.Apagar(id);
     return(RedirectToAction("Index"));
 }