Using SQLite in a WPF application that schedules events for people. The application will be used by 2-4 users concurrently. I'm wondering how to ensure each user has the most current database information.
What I came up with is:
- Start a separate thread responsible for checking for database updates.
- Use time interval setting (e.g. 30s, 1 min, 2 min, 5 min, etc.) to SELECT the data.
- Pull all data and create a new in-memory collection for the domain.
Once I have that working then I can use things like LastModifiedDataAndTime column to keep track of when the database was modified so I'm not querying the same data. It seems awfully inefficient to create (recreate) a new collection every 30s, 1 min, 5 min, etc. Am I going about this the correct way using a separate thread to SELECT the schedule data?