How do you map an enum as an int value with fluent NHibernate?

后端 未结 7 1944
迷失自我
迷失自我 2020-11-27 11:04

Question says it all really, the default is for it to map as a string but I need it to map as an int.

I\'m currently using Persistenc

相关标签:
7条回答
  • 2020-11-27 11:37

    this is how I've mapped a enum property with an int value:

    Map(x => x.Status).CustomType(typeof(Int32));
    

    works for me!

    0 讨论(0)
提交回复
热议问题