コード例 #1
0
        public virtual ApiTestAllFieldTypeClientResponseModel MapClientRequestToResponse(
            int id,
            ApiTestAllFieldTypeClientRequestModel request)
        {
            var response = new ApiTestAllFieldTypeClientResponseModel();

            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);
        }
コード例 #2
0
        public virtual async Task <UpdateResponse <ApiTestAllFieldTypeClientResponseModel> > TestAllFieldTypeUpdateAsync(int id, ApiTestAllFieldTypeClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/TestAllFieldTypes/{id}", item, cancellationToken).ConfigureAwait(false);

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