title: Linq to NHibernate Distinct() "Expression type not supported" error
body: <p>I've got the following code:</p>
  
  <pre><code> var data = (from v in this.GetSession().Query&lt;WorkCellLoadGraphData&gt;()
                      where v.WorkCellId == "13"
                      select
                          new WorkCellLoadGraphData
                              {   
                                  RowId = v.RowId,
                                  WorkCellId = v.WorkCellId,
                                  WorkCellName = v.WorkCellName,
                                  WorkCellGroupId = v.WorkCellGroupId,
                                  WorkCellGroupName = v.WorkCellGroupName
                              });
          return data.Distinct();
  </code></pre>
  
  <p>If I don't call the Distinct() extension method, I have no issues whatsoever. However, if I do call the Distinct() method, I get the following error:</p>
  
  <blockquote>
    <p>Expression type 10005 is not supported
    by this SelectClauseVisitor.</p>
  </blockquote>
  
  <p>After some searching I came across this:</p>
  
  <blockquote>
    <p><a href="https://nhibernate.jira.com/browse/NH-2380" rel="nofollow">https://nhibernate.jira.com/browse/NH-2380</a></p>
  </blockquote>
  
  <p>But as you can see I'm not returning an anonymous type. </p>
  
  <p>Has anyone else come across this issue? If so, how did you solve it?</p>
  
  <p>David</p>