We have a winforms application which uses Dapper for database reads.
In one form we have a (possible) long running query on a background thread.
The users want to be able to cancel the query, so i need access to the DbCommand Dapper creates and call Cancel on it, if it is running, from another thread.
What would be the best way of exposing this DbCommand from Dapper?
((WrappedReader)reader).Cancel()
or similar.