Ejemplo n.º 1
0
 // GET: Category/Details/5
 public ActionResult Details(int id)
 {
     try
     {
         var mi = _oneCategory.Execute(id);
         return(View(mi));
     }
     catch (EntityNoFound e)
     {
         return(RedirectToAction("Index"));
     }
     catch (Exception n) {
         return(View());
     }
 }
Ejemplo n.º 2
0
 public ActionResult Get(int id)
 {
     try {
         var categorydto = _oneCategory.Execute(id);
         return(Ok(categorydto));
     }
     catch (EntityNoFound) {
         return(NotFound());
     }
 }