// 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()); } }
public ActionResult Get(int id) { try { var categorydto = _oneCategory.Execute(id); return(Ok(categorydto)); } catch (EntityNoFound) { return(NotFound()); } }