What is the best practice when using SQLite as file in wpf app. I have a database driven app and I want to use SQLite as a file per project. But I'm very green in programming.
Is it correct that each time the user makes a new project the app makes a new database file, holding a fixed table structure that can be used in the app?
This means that each sqlite database file has a unique name and all the dbconnections that are made in the app should correspond to read and write to that file.
Now my read and write dbmethods are spread out over a few viewmodels and how do I dynamically change
String dbConnectionString = @"Data Source =projectA.sqlite";
to
String dbConnectionString = @"Data Source =projectB.sqlite";
String dbConnectionString = @"Data Source =projectC.sqlite";
each one corresponding to the project they want to load and work on in the app. I don't find much info about this matter on the web.
Maybe someone can explain me what the best practice is or how sqlite dB are used as files for a wpf app.
Aucun commentaire:
Enregistrer un commentaire