Open Mx-Boyan opened 9 years ago
I think that's something handled by the base Dapper library instead of my extension.
I don't think it is handled by Dapper internally, just look at all the examples of using Dapper. It doesn't care about opening or closing the connections, you are responsible for setting that up. The issue with your repository implementation is that you setup the connection once (inside the constructor) and re-use it for every call, instead of setting it up before you call dapper and then disposing it. I can create a fork and a submit a PR if you want to see what I mean.
When re-using the same SQL connection for more than one data reader for the same command, the query fails with DataReader already open.