title: Dapper execute stored procedure raises ArgumentException about multi-mapping
body: <p>I have a stored procedure that I'm trying to execute using Dapper that is raising an error that doesn't appear to be pertinent to what I'm trying to do, although I can't seem to figure out what I'm doing wrong.</p>
  
  <p>Here is the signature of the stored procedure that I'm trying to call:</p>
  
  <pre><code>ALTER PROCEDURE [dbo].[stp_UpdateInboundDaf]
      @InboundType varchar(255),
      @Id bigint,
      @UserId bigint,
      @DonationID bigint = NULL,
      @StatusId int = NULL,
      @FinalFlag bit = NULL,
      @ValidatedFlag bit = NULL,
      @SignedFlag bit = NULL
  AS ...
  </code></pre>
  
  <p>Here's the code that I've written to try to call the procedure:</p>
  
  <pre><code>_cnx.Query("stp_UpdateInboundDaf", new
  {
      InboundType = parameters.InboundType,
      Id = parameters.Id,
      UserId = parameters.UserId,
      DonationId = parameters.DonationId,
      StatusId = parameters.StatusId,
      FinalFlag = parameters.IsFinal,
      ValidatedFlag = parameters.Validated,
      SignedFlag = parameters.Signed
  }, commandType: CommandType.StoredProcedure);
  </code></pre>
  
  <p>These are the parameters that are being passed in:</p>
  
  <p><img src="https://i.stack.imgur.com/vrV7Y.png" alt="enter image description here"></p>
  
  <p>And this is the error I'm getting:</p>
  
  <p>"When using the multi-mapping APIs ensure you set the splitOn param if you have keys other than Id
  Parameter name: splitOn"</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The error is being raised from  the <code>SqlMapper.GetDynamicSerializer(IDataRecord reader, int startBound, int length, bool returnNullIfFirstMissing)</code> method. Here's the error location and stack trace:</p>
  
  <p><img src="https://i.stack.imgur.com/iHB5a.png" alt="enter image description here"></p>
  
  <p>Any ideas?</p>
  
  <p>I'm using the current version of Dapper (I <em>literally</em> just cloned the repo on Github and pulled SqlMapper.cs into my project just before writing up this question).</p>