Unfortunately, DisconnectedState has been removed! DisconnectedState will used in a lot of WPF dialogs with the function Merge(). It was the only way to use global cached data in several other client sessions without unwanted database access (tip from Alex Yakunin - 3 years ago). How can this functionality be replaced - without many new code? |
Hello TeaMan I see you already found the solution. we reworked client profile. Old implementation was very slowly. Now it is better. For another people, who will read this topic. In 5.0 we removed DisconnectedState from DO, because it was slowly and had very complicated implementation. It was a part of ClientProfile mode. We reworked ClientProfile mode. So, now if you set option SessionOptions.ClientProfile to session then you can read entities from database without open transaction. Also, as in old Client profile, you can create new instances of entity without opened transaction (and without persisting of changes on DO demand) and save them when you need using Session.SaveChanges() or cancel it using Session.CancelChanges(). For example,
if you use code like that in old client profile,
then you need to change your code, because we removed this method because it was based on old DisconnectedState.
|