title: Parameterized LIKE clause in SQL statement using Dapper
body: <p>I want to perform the following query using Dapper, which currently doesn't return expected results (I think it must be treating the @pName param as literal text within the single quotes?):</p>
  
  <pre><code>var q = "SELECT * FROM Users WHERE Name LIKE '@pName%'";
  </code></pre>
  
  <p>@pName is the param I assign a value to upon executing the query.</p>
  
  <p>Things work if I just build the SQL like:</p>
  
  <pre><code>var q = "SELECT * FROM Users WHERE Name LIKE '" + name + "%'";
  </code></pre>
  
  <p>.. but I would prefer to use a param if possible.</p>
  
  <p>I am executing the query using the following code:</p>
  
  <pre><code>o = _cn.Query&lt;User&gt;(q, new { pName = new DbString { Value = name, IsFixedLength = false, Length = 25, IsAnsi = true } }).ToList();
  </code></pre>
  
  <p>How do I got about this using Dapper?</p>