コード例 #1
0
        public virtual async Task <IActionResult> Patch(string id, [FromBody] JsonPatchDocument <ApiWorkerPoolRequestModel> patch)
        {
            ApiWorkerPoolResponseModel record = await this.WorkerPoolService.Get(id);

            if (record == null)
            {
                return(this.StatusCode(StatusCodes.Status404NotFound));
            }
            else
            {
                ApiWorkerPoolRequestModel model = await this.PatchModel(id, patch);

                UpdateResponse <ApiWorkerPoolResponseModel> result = await this.WorkerPoolService.Update(id, model);

                if (result.Success)
                {
                    return(this.Ok(result));
                }
                else
                {
                    return(this.StatusCode(StatusCodes.Status422UnprocessableEntity, result));
                }
            }
        }
コード例 #2
0
        public async void TestGet()
        {
            ApiWorkerPoolResponseModel response = await this.Client.WorkerPoolGetAsync("A");

            response.Should().NotBeNull();
        }