//Unique constraint request go first (the order matters in service stack) //If the PK constraint was first, it could be used by ServiceStack instead //of the UC route (this is how Route order is controlled) /// <summary>Gets a specific 'Region' based on the 'UcRegionDescription' unique constraint.</summary> public RegionResponse Get(RegionUcRegionDescriptionRequest request) { if (Validator != null) { Validator.ValidateAndThrow(new Region { RegionDescription = request.RegionDescription }, "UcRegionDescription"); } OnBeforeGetRegionUcRegionDescriptionRequest(request); var output = Repository.Fetch(request); OnAfterGetRegionUcRegionDescriptionRequest(request, output); if (output.Result == null) { throw new HttpError(HttpStatusCode.NotFound, "NullReferenceException", "Region matching [RegionDescription = {0}] does not exist".Fmt(request.RegionDescription)); } return(output); }
partial void OnAfterGetRegionUcRegionDescriptionRequest(RegionUcRegionDescriptionRequest request, RegionResponse response);
partial void OnBeforeGetRegionUcRegionDescriptionRequest(RegionUcRegionDescriptionRequest request);