Example #1
0
        public void ThrowsOnUnRecognizedExpressionType()
        {
            var expression = (Expression)Expression.MakeBinary(
                ExpressionType.Modulo,
                MemberAccessId,
                Expression.Constant(1));

            TestDelegate call = () => builder.VisitExpression(expression);

            Assert.That(call, Throws.Exception.InstanceOf <NotSupportedException>());
        }
        public override void VisitWhereClause(WhereClause whereClause, QueryModel queryModel, int index)
        {
            var visitor = new QueryBuildingExpressionTreeVisitor(fieldMappingInfoProvider);

            visitor.VisitExpression(whereClause.Predicate);

            model.AddQuery(visitor.Query);
        }