Map to Serializable in Fluent NHibernate

佐手、 提交于 2019-12-11 20:36:24

问题


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**>();

??


回答1:


Map(c => c.PropertyName).CustomType<NHibernate.Type.SerializableType>()

seems to do it




回答2:


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



来源:https://stackoverflow.com/questions/2000798/map-to-serializable-in-fluent-nhibernate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!