public virtual ApiTestAllFieldTypesNullableClientResponseModel MapClientRequestToResponse(
            int id,
            ApiTestAllFieldTypesNullableClientRequestModel request)
        {
            var response = new ApiTestAllFieldTypesNullableClientResponseModel();

            response.SetProperties(id,
                                   request.FieldBigInt,
                                   request.FieldBinary,
                                   request.FieldBit,
                                   request.FieldChar,
                                   request.FieldDate,
                                   request.FieldDateTime,
                                   request.FieldDateTime2,
                                   request.FieldDateTimeOffset,
                                   request.FieldDecimal,
                                   request.FieldFloat,
                                   request.FieldImage,
                                   request.FieldMoney,
                                   request.FieldNChar,
                                   request.FieldNText,
                                   request.FieldNumeric,
                                   request.FieldNVarchar,
                                   request.FieldReal,
                                   request.FieldSmallDateTime,
                                   request.FieldSmallInt,
                                   request.FieldSmallMoney,
                                   request.FieldText,
                                   request.FieldTime,
                                   request.FieldTimestamp,
                                   request.FieldTinyInt,
                                   request.FieldUniqueIdentifier,
                                   request.FieldVarBinary,
                                   request.FieldVarchar,
                                   request.FieldXML);
            return(response);
        }
Esempio n. 2
0
        public virtual async Task <UpdateResponse <ApiTestAllFieldTypesNullableClientResponseModel> > TestAllFieldTypesNullableUpdateAsync(int id, ApiTestAllFieldTypesNullableClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/TestAllFieldTypesNullables/{id}", item, cancellationToken).ConfigureAwait(false);

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