Use this connectionString
<add name="DWContext" connectionString="Data Source=|DataDirectory|DBPerson.s3db" providerName="System.Data.SQLite" />
Then set the DataDirectory path to your code before initializing the Context objext.
string executable = System.Reflection.Assembly.GetExecutingAssembly().Location; string path = (System.IO.Path.GetDirectoryName(executable)); AppDomain.CurrentDomain.SetData("DataDirectory", path);
source share