title: NHibernate Queryable not allowing string comparison
body: <p>I have the following code</p>
  
  <pre><code>var results =
                  repository.GetItemsAsQuery&lt;User&gt;().Where(
                      user =&gt; user.EmailAddress.Equals(emailAddress, StringComparison.CurrentCultureIgnoreCase));
  
              return results.Any();
  </code></pre>
  
  <p>Repository is just my wrapper around the NHibernate session and that method has the following signature</p>
  
  <pre><code>public IQueryable&lt;T&gt; GetItemsAsQuery&lt;T&gt;()
          {
              try
              {
                  CheckHasErrored();
  
                  return _connection.Session.Query&lt;T&gt;();
              }
              catch (Exception ex)
              {
                  HasErrored = true;
                  throw new DataRepositoryException(string.Format("Error getting collection of items of type '{0}'", typeof(T).Name), "DataRepository.GetItems&lt;&gt;", ex);        
              }
          }
  </code></pre>
  
  <p>When I run the first method, I get the error NotSupportException - Boolean Equals(System.String, System.StringComparison) with source NHibernate.</p>
  
  <p>Which seems to imply the error is coming from the LINQ lambda expression that I am trying to filter the NHibernate query on</p>
  
  <pre><code>user.EmailAddress.Equals(emailAddress, StringComparison.CurrentCultureIgnoreCase)
  </code></pre>
  
  <p>Am I using NHibernate Queryable wrong? The equivalent SQL I want it to generate is</p>
  
  <pre><code>select * from User where emailAddress = @emailAddress
  </code></pre>
  
  <p>So I only get one row returned across the data network.</p>