title: Dapper. Map to SQL Column with spaces in column names
body: <p>I've managed to get something up and running today as small sandbox/POC project, but have seemed to bump my head on one issue... </p>
  
  <p><strong>Question:</strong></p>
  
  <blockquote>
    <p>Is there a way to get dapper to map to SQL column names with spaces in them.</p>
  </blockquote>
  
  <p>I have something to this effect as my result set.</p>
  
  <p><strong>For example:</strong> </p>
  
  <pre><code>SELECT 001 AS [Col 1], 
         901 AS [Col 2],
         00454345345345435349 AS [Col 3],
         03453453453454353458 AS [Col 4] 
  FROM [Some Schema].[Some Table]
  </code></pre>
  
  <p>And my class would look like this</p>
  
  <pre><code>    public class ClassA
      {          
          public string Col1 { get; set; }    
  
          public string Col2 { get; set; }
  
          ///... etc
       }
  </code></pre>
  
  <p>My implementation looks like this at the moment</p>
  
  <pre><code> public Tuple&lt;IList&lt;TClass&gt;, IList&lt;TClass2&gt;&gt; QueryMultiple&lt;TClass, TClass2&gt;(object parameters)
   {
        List&lt;TClass&gt; output1;
        List&lt;TClass2&gt; output2;
  
        using (var data = this.Connection.QueryMultiple(this.GlobalParameter.RpcProcedureName, parameters, CommandType.StoredProcedure))
        {
             output1 = data.Read&lt;TClass&gt;().ToList();
             output2 = data.Read&lt;TClass2&gt;().ToList();
        }
  
        var result = new Tuple&lt;IList&lt;TClass&gt;, IList&lt;TClass2&gt;&gt;(output1, output2);
        return result;
    }
  </code></pre>
  
  <p><strong>Note: The SQL cant be modified in any way.</strong> </p>
  
  <p>Currently I'm going through the dapper code, and my only foreseeable solution is to add some code to "persuade" the column comparison, but not having much luck so far. </p>
  
  <p>I've seen on StackOverflow that there are things like dapper extensions, but I'm hoping I can get this done without adding an extention, if not. I'll take whatever is quickest to implement.</p>