FluentNHibernate自动映射和的ISet在.NET 4.0中 [英] FluentNHibernate Auto Mappings and ISet in .NET 4.0

查看:148
本文介绍了FluentNHibernate自动映射和的ISet在.NET 4.0中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置自动映射到地图 System.Collections.Generics.ISet< T> 正确

How to set up auto mapping to map System.Collections.Generics.ISet<T> correctly?

我试图实施 IHasManyConvention ,但在智能感知似乎 IOneToManyCollectionInstance 没有任何东西是(?)

I tried implementing IHasManyConvention, but in intellisense it seems that IOneToManyCollectionInstance does not have anything for that(?)

推荐答案

这是达不到功能NHibernate,因为NHibernate的只是没有任何内置的实施 System.Collections.Generics。的ISet&LT; T&GT;

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

如果你真的想使用.NET的的ISet代替Iesi.Collections,现在你得自己写。使用<一个href="https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk/nhibernate/src/NHibernate/Collection/Generic/PersistentGenericSet.cs"相对=nofollow> PersistentGenericSet ,以供参考。

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.

这篇关于FluentNHibernate自动映射和的ISet在.NET 4.0中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆