We use Dapper to display our sql data, and so far it has worked very well. I have a case, although we are doing something similar to:
someObject = con.Query<T>("GetInfoSproc", p, commandType: CommandType.StoredProcedure).Single();
This works fine as long as the stored procedure I call returns the data. There are times when a stored procedure may not return a result and return an error in the out parameter. This seems to be causing the problem in Dapper because dapper throws an error:
"When using the multiple display APIs, make sure you set the splitOn parameter if you have keys other than Id."
Is there a way to write a query so that it can correctly handle the case when an empty result is returned or is this a Dapper constraint?
source share