I have a lot of enumerations as properties in my codefluent model. Codefluent uses an int as datatype to store this. In all cases a TinyInt would suffice. I can set the datatype to int16. How can i reduce it even further to set it to TinyInt.
PS Maybe setting it to INT16 by default would be better for enums.
The attribute enumTypeName
allows to define the underlying CLR full type name. The DbType is inferred from the CLR type name. If you set System.Int16
, the DbType will also be Int16
:
<cf:enumeration name="Gender" enumTypeName="System.Int16">
<cf:enumerationValue name="Unspecified" />
<cf:enumerationValue name="Male" />
<cf:enumerationValue name="Female" />
</cf:enumeration>
You can set the value of this attribute in the graphical interface: