/// <summary>Gets a specific 'Category' based on it's primary key.</summary>
        public CategoryResponse Get(CategoryPkRequest request)
        {
            if (Validator != null)
            {
                Validator.ValidateAndThrow(new Category {
                    CategoryId = request.CategoryId
                }, "PkRequest");
            }

            OnBeforeGetCategoryPkRequest(request);
            var output = Repository.Fetch(request);

            OnAfterGetCategoryPkRequest(request, output);
            if (output.Result == null)
            {
                throw new HttpError(HttpStatusCode.NotFound, "NullReferenceException", "Category matching [CategoryId = {0}]  does not exist".Fmt(request.CategoryId));
            }
            return(output);
        }
 partial void OnAfterGetCategoryPkRequest(CategoryPkRequest request, CategoryResponse response);
 partial void OnBeforeGetCategoryPkRequest(CategoryPkRequest request);