Reputation: 221
When I add an Entity Framework Model to a class library, it creates an app.config file where the connection string is stored.
What do I have to do, to bake the connection string into the project output (*.dll)?
Upvotes: 3
Views: 1760
Reputation: 27943
Store it in a constant or compute it in a variable dbConnect
, then pass into the constructor.
MyDatabaseEntities = new MyDatabaseEntities(dbConnect);
Upvotes: 5