Skip to content

NHibernate List, Bag and Set that implement IBindingList, INotifyCollectionChanged or both

License

Notifications You must be signed in to change notification settings

FrancescoCrimi/CiccioSoft.NhbCollections

Repository files navigation

CiccioSoft.NhbCollections

Nuget

Summary

This library adds support for IBindingList and INotifyCollectionChanged to NHibernate bag, set and list.

How To

to add IBindingList to NHibernate bag, set and list:

NHibernate.Cfg.Configuration configuration = new NHibernate.Cfg.Configuration();
...
configuration.SetProperty(NHibernate.Cfg.Environment.CollectionTypeFactoryClass,
  "CiccioSoft.NhbCollections.CollectionBindingTypeFactory, CiccioSoft.NhbCollections");

to add INotifyCollectionChanged to NHibernate bag, set and list:

NHibernate.Cfg.Configuration configuration = new NHibernate.Cfg.Configuration();
...
configuration.SetProperty(NHibernate.Cfg.Environment.CollectionTypeFactoryClass,
  "CiccioSoft.NhbCollections.CollectionObservableTypeFactory, CiccioSoft.NhbCollections");

to add IBindingList and INotifyCollectionChanged to NHibernate bag, set and list:

NHibernate.Cfg.Configuration configuration = new NHibernate.Cfg.Configuration();
...
configuration.SetProperty(NHibernate.Cfg.Environment.CollectionTypeFactoryClass, 
  "CiccioSoft.NhbCollections.CollectionCiccioTypeFactory, CiccioSoft.NhbCollections");