I'm trying to setup Entity Framework 6 in my VB.Net desktop application. I can get it working fine using Production database, but, this is a program where you can login to either production or the test database. When I created the model, I set it up to use production. I would like to be able to use the test database when I login for when I need to do some testing.
I have found various examples, but nothing seems to work. I tried the example where it is supposed to modify the production connection string in app.config so that it uses the test database instead, but that ends up modifying the connection string in the app.exe.config file, and my program barks when I do that anyways.
I found another example to set the connection string to the TEST database within the using db context block as below, but again, that ends up barking also. Am I on the right path, but missing something, or is there a better way to do what I would like to do?
Dim UserEntry As User
Using db = New UserEntities
db.Database.Connection.ConnectionString = myConnString