public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject, ReadOnlyCollection<Expression> arguments, HqlTreeBuilder treeBuilder, IHqlExpressionVisitor visitor) { var constantParameter = arguments[1] as ConstantExpression; if (constantParameter != null && constantParameter.Value == null) return treeBuilder.IsNull(visitor.Visit(arguments[0]).AsExpression()); else return treeBuilder.Equality( visitor.Visit(arguments[0]).AsExpression(), visitor.Visit(arguments[1]).AsExpression()); }
public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject, ReadOnlyCollection<Expression> arguments, HqlTreeBuilder treeBuilder, IHqlExpressionVisitor visitor) { var isNull = treeBuilder.IsNull(visitor.Visit(arguments[0]).AsExpression()); return isNull; }