Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dapper Multi-mapping APIs splitOn param Error - I'm not using MultiMapping

Tags:

c#

.net

sql

dapper

I have a project where I interact with many stored procs. There is no bare SQL Selects. I am using Dapper. We are not trying to use any of the MultiMapping features. I am trying to figure out why this one proc would return that error? What should I check? What should I look for?

Error: When using the multi-mapping APIs ensure you set the splitOn param if you have keys other than Id\r\nParameter name: splitOn

like image 568
BuddyJoe Avatar asked Dec 12 '22 07:12

BuddyJoe


1 Answers

You should use Execute() instead of Query(), as your SP does not return any record. Dapper assumes you are trying to get data, so maps the missing results to your model class.

like image 193
Herman Kan Avatar answered May 10 '23 02:05

Herman Kan