lundi 5 octobre 2015

How to customize SQLite Connection String to specific path?

I'm writing a desktop application using VS2015 + WPF + SQLite + EF6. My connection string looks like the following:

<connectionStrings>
    <add name="WPTContext" connectionString="Data Source=|DataDirectory|WPT.sqlite" providerName="System.Data.SQLite.EF6" />
</connectionStrings>

I'd like to put the database file to (User folder)\Local\MyApp\File.sqlite. How should I configure the connection string, such that application seeks for the database file in that specific folder?

Aucun commentaire:

Enregistrer un commentaire