WPF creates a whole new range of possibilities, but you can often run into trouble when trying to combine it with NHibernate. NHibernate can’t handle ObservableCollections*, which is a quite handy feature of WPF. Furthermore, what to do with the good databinding capabilities of WPF?
Shawn Duggan provides a nice solution using the **Model-View-ViewModel **pattern here. Check out this recent article by Josh Smith for a good introduction of the MVVM design pattern (with an easy-to-follow example).

  • it is possible to work with NHibernate and ObservableCollections without the MVVM pattern, by either creating your own NHibernate collection class, or by creating a wrapper around ObservableCollection. I find the solution presented by Shawn Duggan to be the most elegant, because it combines it with the MVVM pattern.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.