title: Dapper and Varbinary(max) stream parameters
body: <p>I'm trying to store a binary blob in a database table and get an output back from it. The data is stored in a <code>MemoryStream</code> object. I'm trying to save this to a sql server 2012 table using query async. The call succeeds but no data is inserted into the column. (e.g. I get a 0x0 entry when I query it back).</p>
  
  <p>Sure enough, actually checking a trace I see dapper sending a 0x0. The memorystream has a length so am I doing something wrong or does dapper not support this scenario?
  My query string is just a simple insert and gets the id and insertion time back.</p>
  
  <p>I'm using the following call</p>
  
  <pre><code>using(var conn=new SqlConnection(_connstr)){
  
  var dynParams = new DynamicParameters();
  dynParams.Add("BinaryBlob",
  _memoryStream,DbType.Binary,ParameterDirection.Input,-1);
  var res = await conn.QueryAsync&lt;MyResultType&gt;(_queryStr, dynParams);
  }
  </code></pre>
  
  <p>The query inserts a row and gets a timestamp back, but no data is actually inserted. What am I doing wrong?</p>