public virtual ApiChainStatusClientRequestModel MapClientResponseToRequest(
            ApiChainStatusClientResponseModel response)
        {
            var request = new ApiChainStatusClientRequestModel();

            request.SetProperties(
                response.Name);
            return(request);
        }
        public virtual ApiChainStatusClientResponseModel MapClientRequestToResponse(
            int id,
            ApiChainStatusClientRequestModel request)
        {
            var response = new ApiChainStatusClientResponseModel();

            response.SetProperties(id,
                                   request.Name);
            return(response);
        }
Пример #3
0
        public virtual async Task <UpdateResponse <ApiChainStatusClientResponseModel> > ChainStatusUpdateAsync(int id, ApiChainStatusClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/ChainStatus/{id}", item, cancellationToken).ConfigureAwait(false);

            this.HandleResponseCode(httpResponse);
            return(JsonConvert.DeserializeObject <UpdateResponse <ApiChainStatusClientResponseModel> >(httpResponse.Content.ContentToString()));
        }