FluentNHibernate Auto Mappings and ISet in .NET 4.0

孤人 提交于 2019-12-06 04:58:13

This is not up to Fluent NHibernate, because NHibernate just doesn't have any built-in implementation for System.Collections.Generics.ISet<T>.

If you really want to use .NET's ISet instead of Iesi.Collections, for now you'll have to write it yourself. Use PersistentGenericSet for reference.

As far as I know, the only generic you can automap right out of the box (i.e. without Conventions, Overrides, or Mapping Classes) is IList.

I've seen a lot of people ask how to map IDictionary, and believe it is possible, but have not needed to do this myself.

But maybe if you do some searching on mapping IDictionaries, you'll learn enough to map an ISet. And if you succeed, please post the code here as an answer to your question!

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