dapper-wrapper icon indicating copy to clipboard operation
dapper-wrapper copied to clipboard

Weird Issue with Query / Query<T> results returning NULL.

Open PureKrome opened this issue 11 years ago • 4 comments

Hi Drew.

this is a werid one and I have no idea how to repo it. @buildstarted did get some code going, but it seemed to work (so no issue) but in my project i got two weird issues.

=> When testing my code while debugging (eg. in an XUnit and stepping through code or just F5 debugging) the Query (from the Dapper-Wrapper) was returning NULL (sometimes).

We all know queries never return null. Empty list - sure, null, nope.

It never seemed to happen when I did a run without debugging. Like .. unit test -> run.

I'm going to have to do more research but this really stumped me for a good few hours today :cry:

The wrapper code is very simple - which is why i'm stumped.

It's like .. when i got a result that was going to be an empty result .. I got a NULL.

Swapping my code around so i'm using a normal SqlConnection instead of a Dapper-Wrapper fixed it instantly.

So i don't have my new test(s) working right now.

Anyways - just starting a convo on this. If i get more data, i'll post it in here. Maybe someone else might be getting this issue?

PureKrome avatar Feb 06 '14 09:02 PureKrome

For the record here's the test i wrote. https://gist.github.com/Buildstarted/8873975

Buildstarted avatar Feb 07 '14 23:02 Buildstarted

I am also getting this when debugging. Any solution?

smithsson68 avatar Jun 03 '15 14:06 smithsson68

Unfortunately, I haven't had time to do anything with this project in ages. I honestly just figured no one was using it. Anyone that wants commit rights to fix these problems is welcome to it. Just let me know. Sorry!

half-ogre avatar Jun 04 '15 04:06 half-ogre

As I am sure you have already gathered from me neglecting issues on this repo, I am no longer (and haven't been for years) maintaining this library. I apologize it has taken me this long to properly respond to this to let you know, and to archive this repo.

half-ogre avatar Nov 02 '19 18:11 half-ogre