Posts tagged as:

ObservableCollection

Implementing Dirty Flags When Using DataBinding With NHibernate

February 12, 2009

A common feature of any reasonably well designed application is to notify a user if they are about to cancel or lose pending changes. This becomes more difficult if you are using databinding, and even more so if you are binding directly to your domain objects. This post illustrates an easy way to implement databinding with dirty flags while promoting loose coupling between your domain objects and your UI.

Read the full article →

WPF Databinding with NHibernate Collections

January 24, 2009

WPF and Silverlight offer powerful databinding features. To take advantage of this, your entities are required to implement the INotifyPropertyChanged and INotifyCollectionChanged interfaces. It sounds pretty easy, but there is a catch. By default the collections that NHibernate uses are IDictionary, IList and ISet, none of which implement the INotifyCollectionChanged interface which is needed for databinding to work. There is a way around this limitation.

Read the full article →