I am grabbing the underlying connection from my ObjectContext
. I need to check the state of the connection and open it if necessary. I am wondering whether I need to close it or if this will be taken care of for me.
I am disposing of my context anyway, which I assume is closing the connection.
Should I be opening this connection manually in the first place?
FYI: I am purposely avoiding the convenience methods ExecuteStoredCommand
and ExecuteStoredQuery
. We have some older code that works against the old ADO.NET classes. I just want to expose the connection and make sure it's ready to use.