public SimpleResponse <bool> Any(TerritoryDeleteRequest request)
        {
            if (Validator != null)
            {
                Validator.ValidateAndThrow(new Territory {
                    TerritoryId = request.TerritoryId
                }, ApplyTo.Delete);
            }

            OnBeforeTerritoryDeleteRequest(request);
            var output = Repository.Delete(request);

            OnAfterTerritoryDeleteRequest(request, output);
            if (!output.Result)
            {
                throw new HttpError(HttpStatusCode.NotFound, "NullReferenceException", "Territory matching [TerritoryId = {0}]  does not exist".Fmt(request.TerritoryId));
            }
            return(output);
        }
 partial void OnAfterTerritoryDeleteRequest(TerritoryDeleteRequest request, SimpleResponse <bool> deleted);
 partial void OnBeforeTerritoryDeleteRequest(TerritoryDeleteRequest request);