I am getting this exception from Dapper.SqlMapper.GridReader when calling
var resultSet = await SqlConnection.QueryMultipleAsync(query, parameters, commandType: CommandType.StoredProcedure);
var results = await resultSet.ReadAsync<resultDb>();
No columns were selected at Dapper.SqlMapper.GetTypeDeserializerImpl(Type type, DbDataReader reader, Int32 startBound, Int32 length, Boolean returnNullIfFirstMissing) in /_/Dapper/SqlMapper.cs:line 3291 etc.*
This is a natural result of no rows being available in the GridReader, but I would like to mitigate this case in my code without exception handling.
unfortunately GridReader.IsConsumed is yielding false in my case (maybe due to an OUTPUT parameter?), so I can't use this as a switch.
I'm looking for some way to access the GridReader.Reader.HasRows without reflection as it yields the correct false for my scenario, but I can't seem to find it exposed anywhere.
What would be the way to do this? (I am not looking for a "return dummy rows" answer)