Beispiel #1
0
        public virtual ApiTestAllFieldTypesNullableServerResponseModel MapServerRequestToResponse(
            int id,
            ApiTestAllFieldTypesNullableServerRequestModel request)
        {
            var response = new ApiTestAllFieldTypesNullableServerResponseModel();

            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);
        }
Beispiel #2
0
        public virtual ApiTestAllFieldTypesNullableServerResponseModel MapEntityToModel(
            TestAllFieldTypesNullable item)
        {
            var model = new ApiTestAllFieldTypesNullableServerResponseModel();

            model.SetProperties(item.Id,
                                item.FieldBigInt,
                                item.FieldBinary,
                                item.FieldBit,
                                item.FieldChar,
                                item.FieldDate,
                                item.FieldDateTime,
                                item.FieldDateTime2,
                                item.FieldDateTimeOffset,
                                item.FieldDecimal,
                                item.FieldFloat,
                                item.FieldImage,
                                item.FieldMoney,
                                item.FieldNChar,
                                item.FieldNText,
                                item.FieldNumeric,
                                item.FieldNVarchar,
                                item.FieldReal,
                                item.FieldSmallDateTime,
                                item.FieldSmallInt,
                                item.FieldSmallMoney,
                                item.FieldText,
                                item.FieldTime,
                                item.FieldTimestamp,
                                item.FieldTinyInt,
                                item.FieldUniqueIdentifier,
                                item.FieldVarBinary,
                                item.FieldVarchar,
                                item.FieldXML);

            return(model);
        }