public virtual ApiEmailClientRequestModel MapClientResponseToRequest(
            ApiEmailClientResponseModel response)
        {
            var request = new ApiEmailClientRequestModel();

            request.SetProperties(
                response.ArtistId,
                response.DateCreated,
                response.EmailValue);
            return(request);
        }
        public virtual ApiEmailClientResponseModel MapClientRequestToResponse(
            int id,
            ApiEmailClientRequestModel request)
        {
            var response = new ApiEmailClientResponseModel();

            response.SetProperties(id,
                                   request.ArtistId,
                                   request.DateCreated,
                                   request.EmailValue);
            return(response);
        }
コード例 #3
0
        public virtual async Task <UpdateResponse <ApiEmailClientResponseModel> > EmailUpdateAsync(int id, ApiEmailClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/Emails/{id}", item, cancellationToken).ConfigureAwait(false);

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