in a using block for a connection to the entities,
How am I to reuse the connection when calling another method?
so I have:
using (SampleEntities entities = new SampleEntities()) {
entities.Connection.Open();
SomeMethod();
...
}
void SomeMethod() {
using (SampleEntities entities = new SampleEntities())
{
// I want to be able to use the existing connection before the method call, any ideas?
}
}