title: How to Get entity by Unique Key using Dapper.Contrib?
body: <p>I have an object, assume</p>
  
  <pre><code>public class User
  {
      [Key]
      int TheId { get; set; }
      string Name { get; set; }
      int Age { get; set; }
  }
  </code></pre>
  
  <p><code>TheId</code> is my auto increment column and <code>Name</code> is my unique key. When saving a user, I want to check its existence by:</p>
  
  <pre><code>var user= connection.Get&lt;User&gt;("John");
  </code></pre>
  
  <p>But, because of my Key is not <code>Name</code> but <code>TheId</code>, I can't do this. If I set <code>Name</code> property as <code>[KeyExplicit]</code> that time when I want to save my user by:</p>
  
  <pre><code>connection.Insert(myUser);
  </code></pre>
  
  <p>This time, dapper expect <code>TheId</code> property filled by me, not let database to auto increment.</p>
  
  <p>So, I wonder is there an elegant way to achieve to mark some property or properties to dapper take into account while searching on db. I don't want to search by <code>Guid</code> but unique keys.</p>