I just stumbled upon an error in NHibernate, which may already have been raised: https://nhibernate.jira.com/browse/NH-2763
I'm not sure if this applies to anything but the others, but when using Lambda from VB it looks different than Lambda from C #.
FROM#:
Where(x => x.Status == EmployeeStatus.Active)
B. B.
Where(Function(x) x.Status = EmployeeStatus.Active)
Are they the same as far as I know? (My VB is not great)
If I put a breakpoint on the same line of code that the above code is passed to. In C #, I get:

On the same line when the VB version is being transferred, I get:

Am I doing something wrong? Is the result the same just displayed between C # / VB?
Edit: Okay, so they appear different, but they cannot be the same because NHibernate cannot handle this. The C # version is handled nicely by NHibernate, the VB version is allowed with the following exception:

NHibernate StackTrace:
at NHibernate.Impl.ExpressionProcessor.FindMemberExpression(Expression expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 168 at NHibernate.Impl.ExpressionProcessor.ProcessSimpleExpression(Expression left, Expression right, ExpressionType nodeType) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 323 at NHibernate.Impl.ExpressionProcessor.ProcessSimpleExpression(BinaryExpression be) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 316 at NHibernate.Impl.ExpressionProcessor.ProcessBinaryExpression(BinaryExpression expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 418 at NHibernate.Impl.ExpressionProcessor.ProcessExpression(Expression expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 486 at NHibernate.Impl.ExpressionProcessor.ProcessExpression[T](Expression`1 expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 504 at NHibernate.Criterion.QueryOver`2.Add(Expression`1 expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Criterion\QueryOver.cs:line 635 at NHibernate.Criterion.QueryOver`2.NHibernate.IQueryOver<TRoot,TSubType>.Where(Expression`1 expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Criterion\QueryOver.cs:line 686 at *removed*.EmployeeRepository.GetByEntityId(Int64 entityId, Expression`1 basicCriteria) in D:\*removed*\EmployeeRepository.cs:line 76
So, should something be different between the two?
Edit 2:
For Jonathan. This is a method that uses an expression:
public IEnumerable<Employee> GetByEntityId(long entityId, Expression<Func<Employee, bool>> basicCriteria) { IEnumerable<Employee> result; using (var tx = Session.BeginTransaction()) { var employeeQuery = Session.QueryOver<Employee>() .Where(x => x.EntityId == entityId); if (basicCriteria != null) employeeQuery = employeeQuery.Where(basicCriteria); result = employeeQuery.List(); tx.Commit(); } return result; }