title: How can I call C# custom function in NHibernate grouping?
body: <p>I have the below code, but NHibernate can't recognize custom C# function.</p>
  
  <pre><code>var query = Session.QueryOver&lt;MyObject&gt;().Select(
              Projections.Group&lt;MyObject&gt;(x =&gt; GetDateTimeOffset(x.Date)),
              Projections.Sum&lt;MyObject&gt;(x =&gt; x.TotalBytes));
  
  public DateTime GetDateTimeOffset(DateTime date)
  {
      ..............
  }
  </code></pre>