/// <summary>Gets a specific 'EmployeeTerritory' based on it's primary key.</summary>
        public EmployeeTerritoryResponse Get(EmployeeTerritoryPkRequest request)
        {
            if (Validator != null)
            {
                Validator.ValidateAndThrow(new EmployeeTerritory {
                    EmployeeId = request.EmployeeId, TerritoryId = request.TerritoryId
                }, "PkRequest");
            }

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

            OnAfterGetEmployeeTerritoryPkRequest(request, output);
            if (output.Result == null)
            {
                throw new HttpError(HttpStatusCode.NotFound, "NullReferenceException", "EmployeeTerritory matching [EmployeeId = {0}, TerritoryId = {1}]  does not exist".Fmt(request.EmployeeId, request.TerritoryId));
            }
            return(output);
        }
 partial void OnAfterGetEmployeeTerritoryPkRequest(EmployeeTerritoryPkRequest request, EmployeeTerritoryResponse response);
 partial void OnBeforeGetEmployeeTerritoryPkRequest(EmployeeTerritoryPkRequest request);