/// <summary>Gets a specific 'Region' based on it's primary key.</summary> public RegionResponse Get(RegionPkRequest request) { if (Validator != null) { Validator.ValidateAndThrow(new Region { RegionId = request.RegionId }, "PkRequest"); } OnBeforeGetRegionPkRequest(request); var output = Repository.Fetch(request); OnAfterGetRegionPkRequest(request, output); if (output.Result == null) { throw new HttpError(HttpStatusCode.NotFound, "NullReferenceException", "Region matching [RegionId = {0}] does not exist".Fmt(request.RegionId)); } return(output); }
partial void OnAfterGetRegionPkRequest(RegionPkRequest request, RegionResponse response);
partial void OnBeforeGetRegionPkRequest(RegionPkRequest request);