Queryasync skipped to next line without return anything
I face same issue in .net 4.8 and .net 5,6 and 7 also, whenever I use queryasync, queryfirstordefaultasync() ... Any async functions with or without await is not working. it just skip the line and hang total application forever. Not even return exception. Why and how can i overcome the issue, i use the latest version of dapper everytime when I tried.
All same queries without async working fine.
Off the top of my head there are two possible ways this could happen:
- sync context deadlock if we've missed a ConfigureAwait
- a dropped TCS in a provider
We can investigate, but some clues on how to repro would help; is there a sync-context here? I.e. is SynchronizationContext.Current non-null? And what database provider are you using?
Oh, and example code that shows exactly what method you're using, so I can check for a missing ConfigureAwait