This is from release notes:
** Known BREAKING CHANGES from NH3.3.3.GA to 4.0.0.GA
NHibernate now targets .Net 4.0. Many uses of set types from Iesi.Collections have now been changed to use corresponding types from the BCL. The API for these types are slightly different.
So we can now use interface
System.Collections.Generic.ISet<T>
and as its implementation even the System
built in types, e.g.
System.Collections.Generic.HashSet<T>
And therefore reduce dependency on iesi library...
But as discussed here: What is a suitable NHibernate / Iesi.Collections.Generic.ISet<T> replacement? - we can also use the LinkedHashSet<T>
, ReadOnlySet<T>
, SychronizedSet<T>
Also check the Customer.cs
in NHibernate test project:
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace NHibernate.DomainModel.Northwind.Entities
{
public class Customer
{
private readonly ISet<Order> _orders;
public Customer()
{
_orders = new System.Collections.Generic.HashSet<Order>();
}
public virtual ISet<Order> Orders
{
get { return _orders; }
}
...