Example #1
0
        public virtual ApiSelfReferenceClientRequestModel MapClientResponseToRequest(
            ApiSelfReferenceClientResponseModel response)
        {
            var request = new ApiSelfReferenceClientRequestModel();

            request.SetProperties(
                response.SelfReferenceId,
                response.SelfReferenceId2);
            return(request);
        }
Example #2
0
        public virtual async Task <UpdateResponse <ApiSelfReferenceClientResponseModel> > SelfReferenceUpdateAsync(int id, ApiSelfReferenceClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/SelfReferences/{id}", item, cancellationToken).ConfigureAwait(false);

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