title: nhibernate hql with named parameter
body: <p>I have implemented a search function using Castel Active Record. I thought the code is simple enough but I kept getting </p>
  
  <p><strong>NHibernate.QueryParameterException : could not locate named parameter [searchKeyWords]</strong></p>
  
  <p>errors. Can someone tell me what went wrong? Thanks a million.</p>
  
  <pre><code>public List&lt;Seller&gt; GetSellersWithEmail(string searchKeyWords)
          {
              if (string.IsNullOrEmpty(searchKeyWords))
              {
                  return new List&lt;Seller&gt;();
              }
              string hql = @"select distinct s
                             from Seller s 
                             where  s.Deleted = false 
                                    and ( s.Email like '%:searchKeyWords%')";
  
              SimpleQuery&lt;Seller&gt; q = new SimpleQuery&lt;Seller&gt;(hql);
              q.SetParameter("searchKeyWords", searchKeyWords);
              return q.Execute().ToList();
          }
  </code></pre>