I have two C# programs that share a single SQLite database file.
One program (let's call it Writer) writes new data to the database. The other program (Reader) reads it. Both programs use Fluent NHibernate and System.Data.SQLite to access the DB.
Currently, I've just got a big Refresh button on my Reader program, and the user has to click it to get any new data that was written to the DB since the last refresh. This works, but is hardly elegant.
Is there any way to get NHibernate to fire an event in the Reader program when the DB is updated by Writer, so I can automatically present new data to the user? (I looked at the NH docs for Interceptors and Events, but it was not clear if these would do what I want)
Or, is there a good way to poll for updates using NH?
Failing an NH solution, can I do something similar with System.Data.SQLite, or via another lower level mechanism?