I know that it's not a good practice to keep a DataContext alive and re-use it, so I wrapped it in a Using statement.
Also, as far as I know, DataContext opens a connection when it's being initialized, and closes the connection when it's disposed.
What I'm looking to accomplish here, is keeping a separate connection open for each currently logged in user (and close the connection manually when the user logs out).
Multithreading is not an issue, because I'm using locks.
I keep SQLConnections and pass them to the DataContext constructor. This sort of works. But the problem is that DataContext automatically closes the connection when it's disposed.
Is it somehow possible to force the DataContext to not close the connection it uses?