title: invoke sql function using nhibernate?
body: <p>I want to query like this:</p>
  
  <pre><code>select * from table where concat(',', ServiceCodes, ',') like '%,33,%';
  select * from table where  (','||ServiceCodes||',') like '%,33,%';
  </code></pre>
  
  <p>so, I wrote this code:</p>
  
  <pre><code>ICriteria cri = NHibernateSessionReader.CreateCriteria(typeof(ConfigTemplateList));
  cri.Add(Restrictions.Like(Projections.SqlFunction("concat", NHibernateUtil.String, Projections.Property("ServiceCodes")), "%,33,%"));
  </code></pre>
  
  <p>I get sql similar :</p>
  
  <pre><code>select * from table where  (ServiceCodes) like '%,33,%';
  </code></pre>
  
  <p>But it is not what I want，how to do it???
  thanks!</p>