System.Data.Common.CommandTrees.ExpressionBuilder.DbExpressionBuilder.Like(System.Data.Common.CommandTrees.DbExpression, System.Data.Common.CommandTrees.DbExpression, System.Data.Common.CommandTrees.DbExpression)

Here are the examples of the csharp api class System.Data.Common.CommandTrees.ExpressionBuilder.DbExpressionBuilder.Like(System.Data.Common.CommandTrees.DbExpression, System.Data.Common.CommandTrees.DbExpression, System.Data.Common.CommandTrees.DbExpression) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

1. Example

Project: referencesource
Source File: CTreeGenerator.cs
View license
public override DbExpression Visit(LikeOp op, Node n)
        {
            //
            // LikeOp converts to DbLikeExpression, with the conversions of the
            // Node's first, second and third child nodes providing the
            // Input, Pattern and Escape expressions.
            //
            return DbExpressionBuilder.Like(
                    VisitChild(n, 0),
                    VisitChild(n, 1),
                    VisitChild(n, 2)
                );
        }

2. Example

View license
public override DbExpression Visit(DbLikeExpression expression)
        {
            EntityUtil.CheckArgumentNull(expression, "expression");

            DbExpression result = expression;

            DbExpression newArgument = this.VisitExpression(expression.Argument);
            DbExpression newPattern = this.VisitExpression(expression.Pattern);
            DbExpression newEscape = this.VisitExpression(expression.Escape);

            if (!object.ReferenceEquals(expression.Argument, newArgument) ||
                !object.ReferenceEquals(expression.Pattern, newPattern) ||
                !object.ReferenceEquals(expression.Escape, newEscape))
            {
                result = CqtBuilder.Like(newArgument, newPattern, newEscape);
            }
            NotifyIfChanged(expression, result);
            return result;
        }

3. Example

View license
private DbExpression TranslateFunctionIntoLike(MethodCallExpression call, bool insertPercentAtStart,/n ..... /n //View Source file for more details /n }