NuGet/WebBackgrounder — comment on commit ed63e6508dc912ab6e143c19f82c0a5724491c89
File: src/WebBackgrounder.EntityFramework/EntityWorkItemRepository.cs line 15
By Haacked:

I need to follow-up on this. In order to run a query in a transaction, I needed to make sure to open the underlying connection within the transaction scope. After the scope is over, the connection is dead and other queries outside the transaction fail. I suppose I could just re-open the connection, but I didn't want to do that unless we knew we were making a query. So instead, I just replace the context with a new instance after the transaction.

I'll dig into it a bit and make sure I'm doing the right thing.