sdk/dotnet/src/Microsoft.Datasync.Client/Query/Linq/QueryTranslator.cs
/// <summary>
/// Add a filtering expression to the query.
/// </summary>
/// <param name="expression">A Where method call expression.</param>
Add a filtering expression to the query.
Add a filtering expression to the query .
internal protected void AddFilter(MethodCallExpression expression)
        {
            if (expression.IsValidLambdaExpression(out LambdaExpression lambda))
            {
                QueryNode filter = FilterBuildingExpressionVisitor.Compile(lambda!.Body, ContractResolver);
                if (QueryDescription.Filter != null)
                {
                    QueryDescription.Filter = new BinaryOperatorNode(BinaryOperatorKind.And, QueryDescription.Filter, filter);
                }
                else
                {
                    QueryDescription.Filter = filter;
                }
                return;
            }
            throw new NotSupportedException("'Where' clause in query expression contains in invalid predicate");
        }
internal protected void AddFilter ( MethodCallExpression expression ) { if ( expression . IsValidLambdaExpression ( out LambdaExpression lambda ) ) { QueryNode filter = FilterBuildingExpressionVisitor . Compile ( lambda ! . Body , ContractResolver ) ; if ( QueryDescription . Filter != null ) { QueryDescription . Filter = new BinaryOperatorNode ( BinaryOperatorKind . And , QueryDescription . Filter , filter ) ; } else { QueryDescription . Filter = filter ; } return ; } throw new NotSupportedException ( " " ) ; }
Add a filtering expression to the query.
Add a filtering expression to the query .
expression
MethodCallExpression
A Where method call expression.
A Where method call expression .