Database connection not open on creating a dbContext
Posted: Thu 25 Jul 2013 13:56
The code we have been using is:
Previous to 4.6.287 we could then use ctx strait away in a LINQ or table object query. After upgrading any query now throws a error with the message that the connection is closed.
We have changed our code to:
The context is created by Entity Developer creating the model from a database.
But are wondering if a bug has been introduced?
Code: Select all
TSDataContext ctx = new TSDataContext(ProjectConnectionString) { ObjectTrackingEnabled = !readOnly };
We have changed our code to:
Code: Select all
TSDataContext ctx = new TSDataContext(ProjectConnectionString) { ObjectTrackingEnabled = !readOnly };
ctx.Connection.Open();
But are wondering if a bug has been introduced?