title: Performing MERGE with Dapper.net
body: <p>We are using Dapper.net for the data layer in an ASP.net MVC 5 app.</p>
  
  <p>One operation requires the use of the MERGE command (if the TitleID exists, update the record, if it doesn't, insert it) - something like this:</p>
  
  <pre><code>MERGE BookInventory bi
  USING BookOrder bo
  ON bi.TitleID = bo.TitleID
  WHEN MATCHED THEN
    UPDATE
    SET bi.Quantity = bi.Quantity + bo.Quantity
  WHEN NOT MATCHED BY TARGET THEN
    INSERT (TitleID, Title, Quantity)
    VALUES (bo.TitleID, bo.Title,bo.Quantity);
  </code></pre>
  
  <p>Can Dapper be used to map values onto this MERGE statement? </p>
  
  <p>I can't find anything on this and it's unclear what the best approach to using MERGE with Dapper.net is?</p>