Map to Serializable in Fluent NHibernate

2019-08-16 19:23发布

NHibernate has a "Serializable" type

<property name="PropertyName" column="ColumnName" type="**Serializable**"  />

Is there a built in type for this in Fluent NHibernate?

Something like

Map(x => x.PropertyName).CustomType<**SerializableType**>();

??

2条回答
祖国的老花朵
2楼-- · 2019-08-16 20:09

Map(c => c.PropertyName).CustomType("serializable");

查看更多
▲ chillily
3楼-- · 2019-08-16 20:15
Map(c => c.PropertyName).CustomType<NHibernate.Type.SerializableType>()

seems to do it

查看更多
登录 后发表回答