Need ExecuteReader()

May 16, 2013 at 8:37 PM
Hi Chris,

Any thoughts on the best way of adding an ExecuteReader function?

I don't need it to return objects. I can do with a set of rows that I'll then use to get objects after.

Something along the lines of

var dt = new DataTable();

return dt;


May 16, 2013 at 9:34 PM
There's really no "clean" way to do it, since readers really aren't the way the ORM works (and why are you using thos memory-hogging DataTables?). Not sure what your use-case is, but I'd be inclined to use DynamicEntity to pull out the data. If you really need a reader, just add a separate extension method in a different file so you don't have to worry about your change being overwritten by changes I do.
May 16, 2013 at 10:14 PM
I'll have to look at the DynamicEntity.

The use case boils down to trying to find parent object that don't have any childs.
May 29, 2013 at 2:54 PM
Well, no sooner than I say "there's no clean way" I end up needing it too. SQLStoreBase now implements ExecuteReader.
May 30, 2013 at 12:53 PM
Thanks, I looked at it. The only thing I had extra was a possibility to pass parameters in. But that's easy to add.