I have a stored procedure that returns multiple result sets. I’m executing this with dapper.
One of the result sets is Person JOIN Checks, where Person can have many Checks.
The end goal is to have distinct person objects that have a collection of check objects.
QueryMultiple gives me a Sqlmapper.GridReader. I see an overload of SqlMapper.GridReader.Read() that takes a Func<TFirst, TSecond, TReturn>.
Is there an example of how to use this?
Here’s how I got it working:
As the comment says, I don’t like the unneeded check property on the Person object.
I’d still love to hear of a better way of doing this.