title: Dapper insert, check for existence of record
body: <p>So i have been using this method to insert records into my database:</p>
  
  <pre><code>TransactionBlock.Connection.Execute(
                              "INSERT Table(Item,Id)VALUES(@Item, @Id);
                              new {Item,Id = id }, TransactionBlock.Transaction);
  </code></pre>
  
  <p>I now need to modify this, to first check if the Item/id are already in the database, using the following:</p>
  
  <p>const sql = "IF EXISTS (SELECT * FROM Table, where Item=@Item...etc etc</p>
  
  <p>but I've not come across any examples of how to achieve this. I can achieve this by creating a Stored Procedure, but i'd like to try and accomplish using this approach.</p>