half-ogre / dapper-wrapper

A simple abstraction atop the Dapper extension methods and TransactionScope for testability.
MIT License
70 stars 35 forks source link

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

Open PureKrome opened 10 years ago

PureKrome commented 10 years ago

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?

Buildstarted commented 10 years ago

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

smithsson68 commented 9 years ago

I am also getting this when debugging. Any solution?

half-ogre commented 9 years ago

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 commented 4 years ago

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.