views:

96

answers:

1

Hi guys, I have this WPF application using NHibernate and lazy data loading. I also use Microsoft Sync framework to sync data to and from a central database server. So what happens is that when I modify data on the central database server and sync it with the WPF client app, I can't get the latest data to be displayed to the UI since NHibernate has cached it already. So I need to restart the WPF application to be able to display the latest synched data.

I need a solution to refresh NHibernate data on the WPF app. How can I do this?

A: 

The first level cache is only active within a given session, so if you use a new session each time you attempt to retrieve the object you should get the latest results (given you don't have the second level cache configured).

Derek Greer