Reputation: 462
I have a working WPF app using MVVM pattern in which the ViewModel calls Queries that do all the save/update/get/delete stuff. I did this because it's easy to modify that queries to swap storage system, for example.
The app is working fine if the data is stored/deleted on the fly but the client wants a Save button so I have to remember (or Nhibernate) which changes are made. I don't want to have a session open long time so I don't know best way to do it. Do you know any pattern/architecture that would work?
Upvotes: 1
Views: 177
Reputation: 30813
this worked for me for a simple app:
session.IsDirty
to enable savebuttonNH will then send all actions at the end on flush
Upvotes: 1