How do I build a dynamic sql query with Dapper.SqlBuilder and OrWhere
<p>I am attempting to build a dynamic Sql query for multiple search terms.  I understand in general how to use the builder, but am not sure what to do in the loop since I actually need the @term to be different each time (I think). Not just in the query, but in the anonymous type as well to match. </p>

<p>I could use a string.Format in the query string, but not sure how to match it in the anonymous type?</p>

<pre><code>public async Task&lt;List&lt;Thing&gt;&gt; Search(params string[] searchTerms)
{
    var builder = new SqlBuilder();
    var template = builder.AddTemplate("SELECT * /**select**/ from ThingTags /**where**/ ");

    for (int i = 0; i &lt; searchTerms.Length; i++)
    {
        builder.OrWhere("value LIKE @term", new { term = "%" + searchTerms[i] + "%" });
    }
...
}
</code></pre>

<p>in the current form the query that gets created for terms "abc" "def" "ghi" is</p>

<pre><code>CommandType: Text, CommandText: SELECT *  from ThingTags WHERE  ( value LIKE @term OR value LIKE @term OR value LIKE @term ) 

Parameters:
Name: term, Value: %ghi%
</code></pre>