Mapping enum with fluent nhibernate

后端 未结 3 734
盖世英雄少女心
盖世英雄少女心 2020-12-14 06:42

I am following the http://wiki.fluentnhibernate.org/Getting_started tutorial to create my first NHibernate project with Fluent NHibernate

I have 2 tables

1)

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-14 07:14

    The following apparently no longer works https://stackoverflow.com/a/503327/189412

    How about just doing this:

    public AgencyMap() {
        Id(o => o.Id);
        Map(o => o.AccountHolderName);
        Map(o => o.AccountType).CustomType();
    }
    

    The custom type handles everything :)

提交回复
热议问题