Is it possible to make an application that has a sqlite database inside the application that does not show any db files? Because I don't want some people to just get there way in the application If it is possible may i request a help or some kind of example?
1 Answers
There are multiple solutions, that come to mind:
In-memory
It is possible to create a sqlite database in memory, but it will obviously be deleted after you close the application. Look at: https://learn.microsoft.com/en-us/dotnet/standard/data/sqlite/in-memory-databases
Example:
If you use Entity-Framework you can specify
var connection = new SqliteConnection("Filename=:memory:");
Then you will not have a file on disc.
Password-Protected
If you want to persist data after the application is closed you always will have to write something on a disc. If you want to prevent your users from manipulating it you could consider protecting it with a password.
For this you can look at: How to connect to sqlite database with password
Encryption
Another way would be to encrypt your database. You can look at: Encrypt SQLite database in C#

- 1,202
- 5
- 15