public virtual ApiVideoClientRequestModel MapClientResponseToRequest(
            ApiVideoClientResponseModel response)
        {
            var request = new ApiVideoClientRequestModel();

            request.SetProperties(
                response.Description,
                response.Title,
                response.Url);
            return(request);
        }
        public virtual ApiVideoClientResponseModel MapClientRequestToResponse(
            int id,
            ApiVideoClientRequestModel request)
        {
            var response = new ApiVideoClientResponseModel();

            response.SetProperties(id,
                                   request.Description,
                                   request.Title,
                                   request.Url);
            return(response);
        }
Beispiel #3
0
        public virtual async Task <UpdateResponse <ApiVideoClientResponseModel> > VideoUpdateAsync(int id, ApiVideoClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/Videos/{id}", item, cancellationToken).ConfigureAwait(false);

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