Exemple #1
0
        public virtual ApiFileTypeClientRequestModel MapClientResponseToRequest(
            ApiFileTypeClientResponseModel response)
        {
            var request = new ApiFileTypeClientRequestModel();

            request.SetProperties(
                response.Name);
            return(request);
        }
Exemple #2
0
        public virtual ApiFileTypeClientResponseModel MapClientRequestToResponse(
            int id,
            ApiFileTypeClientRequestModel request)
        {
            var response = new ApiFileTypeClientResponseModel();

            response.SetProperties(id,
                                   request.Name);
            return(response);
        }
Exemple #3
0
        public virtual async Task <UpdateResponse <ApiFileTypeClientResponseModel> > FileTypeUpdateAsync(int id, ApiFileTypeClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/FileTypes/{id}", item, cancellationToken).ConfigureAwait(false);

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