Support lamdas in linq expression

Description

The following query does not work:

1 2 Func<User, string> property = c => c.Name; var result = _session.Query<User>().Where(c => property(c).StartsWith("N")).Select(u => u.ID).ToList();

Here the generated exception:
_NHibernate.Exceptions.GenericADOException : could not execute query
[ select user0_.ID as col_0_0_ from [User] user0_ where ? like (?+'%') ]
Name1 - Value:System.Func`2[App.User,System.String] Name2 - Value:N
----> System.InvalidCastException : Das Objekt des Typs "System.Func`2[App.User,System.String]" kann nicht in Typ "System.String" umgewandelt werden._

The same approach in native Linq is working as expected.

Environment

None

Status

Assignee

Unassigned

Reporter

RicoP

Labels

Components

Affects versions

4.1.0
4.0.4

Priority

Trivial
Configure