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

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

            OnAfterGetCustomerDemographicPkRequest(request, output);
            if (output.Result == null)
            {
                throw new HttpError(HttpStatusCode.NotFound, "NullReferenceException", "CustomerDemographic matching [CustomerTypeId = {0}]  does not exist".Fmt(request.CustomerTypeId));
            }
            return(output);
        }
 partial void OnAfterGetCustomerDemographicPkRequest(CustomerDemographicPkRequest request, CustomerDemographicResponse response);
 partial void OnBeforeGetCustomerDemographicPkRequest(CustomerDemographicPkRequest request);