public ActionResult GetCategoryByID(int id) { if (id > 0) { var cat = _categoryService.GetByID(id); return(Json(new { Message = "Category retreived!", Status = "success", CategoryRef = cat, ReturnUrl = "/Blog" })); } return(Json(new { Message = "Category could not be found!", Status = "failed", ReturnUrl = "/Blog" })); }