I'm upgrading a Windows SmartClient solution from nHibernate 2.2 to 4.0, using NuGet in Visual Studio 2013.
On this line:
sb.Append ("=" + ((NHibernate.Collection.PersistentBag) state[i]).Count.ToString() + " items");
I get this error:
The type or namespace name 'PersistentBag' does not exist in the namespace 'NHibernate.Collection'
Suggested choices by Visual Studio (when typing the .) are:
- AbstractPersistentCollection
- Generic ( a namespace)
- IPersistentCollection (an interface)
- PersistentArrayHolder
The second and third are not classes. The first and fourth does not have a Count()
method.
Which one have to be used in this case?