Defining enumeration types in a mapping file or columns from another table

if my mapping file, how would I refer to the C # enum type?
what about columns from another table?

0


a source to share


2 answers


You can use the Int32 type directly in your mapping file. Or if you want to use the string representation of your enum you use EnumStringType



0


a source


Instead of Int32, you can use your actual enum type directly in the NHibernate mapping file. For example, if you map an object to a MyEnum property of type Example.NameSpace.MyEnum:



<property name="MyEnum" type="Example.NameSpace.MyEnum">
</property>

      

0


a source







All Articles