title: Using Dapper to populate Enum properties
body: <p>In using Dapper's Query() function, I am trying to fill in a class that has a property which is an enumerated value.  In my database, this column is stored as a byte.  However, in the class, they are an enum.  In the old ADO.NET approach, I'd convert during the reader loop:</p>
  
  <pre><code>myClass.myEnum = (MyEnumType) reader.GetByte(2);
  </code></pre>
  
  <p>When using Dapper, I can't figure out how to do this conversion.  For example when I do something like</p>
  
  <pre><code>myClass = conn.Query&lt;MyClassType&gt;("SELECT ... ")
  </code></pre>
  
  <p>I get an error of the type</p>
  
  <pre><code>Error parsing column 2 (myEnum=1 - Byte)
  </code></pre>
  
  <p>Is there a way to use Dapper's Query() to fill in a class that contains properties which are enum types? </p>