Question

I'm looking for good options for persisting local state of an application (created in .Net / C#.)

I've considered rolling my own solution, or using a simple local database such as Sqllite, however I thought I'd ask the SO community what options are available.

The application I'm working on exists on a Kiosk, and I will need to maintain local state in case of accidental shutdown and other similar exceptions.

What do you recommend?

Update

Well, after further review I decided to use SQLite with DbLinq, the main alternative contender was SQL Server Compact edition, but there are several factors which I found important, which placed SQLite above SQLCE.

Notably.

  • The API provided by SQLCE (IMO) wasn't as rich as the ones provided by both SQLite.net or DbLinq.
  • SQLCE runtime performance wasn't as good as SQLite.
  • SQLite being open-source is a useful factor.

Why I didn't use Properties.Settings or app.config?

For my use case I needed something like a (easily) query-able event log (I need to allow auditing of credit transactions.) The primary state value I was addressing here was available credit on a kiosk. So to restore my state variables at application start up, I can query the log for the last entry and get the required values from there.

When you only need to store a value and retrieve it Properties.Settings or app.config are perfectly adequate places to do this.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top