I need to connect to the database in Sqlite, so I downloaded and installed System.Data.SQLite and dragged all my tables with the designer.
The designer created a .cs file with
public class Entities : ObjectContext
and 3 constructors :
the first
public Entities() : base("name=Entities", "Entities")
this one loads the connection string from App.config and works fine.
App.config
<connectionStrings>
<add name="Entities" connectionString="metadata=res://*/Db.TracModel.csdl|res://*/Db.TracModel.ssdl|res://*/Db.TracModel.msl;provider=System.Data.SQLite;provider connection string="data source=C:\Users\Filipe\Desktop\trac.db"" providerName="System.Data.EntityClient" />
</connectionStrings>
2nd
public Entities(string connectionString) : base(connectionString, "Entities")
third
public Entities(EntityConnection connection) : base(connection, "Entities")
Here is the problem , I already tried n configuration, already used EntityConnectionStringBuilder so that the connection string failed.
Could you point me in the right direction!
EDIT (1)
I can make my requests if I use the constructor without parameters, but I need to change the connection string, I can not use it in my app.config.
?!