TinyInt 作为枚举的数据类型
TinyInt as datatype for enum
我的 codefluent 模型中有很多枚举作为属性。 Codefluent 使用 int 作为数据类型来存储它。在所有情况下,TinyInt 就足够了。我可以将数据类型设置为 int16。我怎样才能进一步减少它以将其设置为 TinyInt。
PS 也许默认设置为 INT16 对枚举会更好。
属性 enumTypeName
允许定义底层 CLR 完整类型名称。 DbType 是从 CLR 类型名称中推断出来的。如果设置 System.Int16
,DbType 也将是 Int16
:
<cf:enumeration name="Gender" enumTypeName="System.Int16">
<cf:enumerationValue name="Unspecified" />
<cf:enumerationValue name="Male" />
<cf:enumerationValue name="Female" />
</cf:enumeration>
您可以在图形界面中设置该属性的值:
我的 codefluent 模型中有很多枚举作为属性。 Codefluent 使用 int 作为数据类型来存储它。在所有情况下,TinyInt 就足够了。我可以将数据类型设置为 int16。我怎样才能进一步减少它以将其设置为 TinyInt。
PS 也许默认设置为 INT16 对枚举会更好。
属性 enumTypeName
允许定义底层 CLR 完整类型名称。 DbType 是从 CLR 类型名称中推断出来的。如果设置 System.Int16
,DbType 也将是 Int16
:
<cf:enumeration name="Gender" enumTypeName="System.Int16">
<cf:enumerationValue name="Unspecified" />
<cf:enumerationValue name="Male" />
<cf:enumerationValue name="Female" />
</cf:enumeration>
您可以在图形界面中设置该属性的值: