3 ms·
>I have no problem writing SQL, but processing the results back out of flat rows into objects gets extremely annoying. I'm pretty sure Dapper lets you do this
by rjbwork 3y ago
>I have no problem writing SQL, but processing the results back out of flat rows into objects gets extremely annoying.
I'm pretty sure Dapper lets you do this fairly easily. You've got a couple options - you can either provide a mapping function, or you can have your query/sprocs return multiple result sets. Then you can assemble the result sets into the object structure.
It's not quite as magical as LINQ, but it's also not quite as annoying and fraught with so much marshalling code as your example.
- marklubi 3y agoWas waiting for Dapper to get brought up. Fantastic micro ORM.