0

if my mapping file, how would I reference a C# enum type?
what about columns from another table?

Blankman
  • 259,732
  • 324
  • 769
  • 1,199

2 Answers2

0

Rather than Int32 you can use your actual enum type directly in the NHibernate mapping file. For example if you are mapping an object with a MyEnum property of type Example.NameSpace.MyEnum:

<property name="MyEnum" type="Example.NameSpace.MyEnum">
</property>
Clafou
  • 15,250
  • 7
  • 58
  • 89
0

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

Darnell
  • 824
  • 5
  • 10