DbExpressionBuilder.Like Method

 

Creates a new DbLikeExpression that compares the specified input string to the given pattern.

Namespace:   System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticLike(DbExpression, DbExpression)

Creates a new DbLikeExpression that compares the specified input string to the given pattern.

System_CAPS_pubmethodSystem_CAPS_staticLike(DbExpression, DbExpression, DbExpression)

Creates a new DbLikeExpression that compares the specified input string to the given pattern using the optional escape.


DbExpressionBuilder.Like Method (DbExpression, DbExpression)

Creates a new DbLikeExpression that compares the specified input string to the given pattern.

public static DbLikeExpression Like(
	this DbExpression argument,
	DbExpression pattern
)

Parameters

argument
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that specifies the input string.

pattern
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that specifies the pattern string.

Return Value

Type: System.Data.Entity.Core.Common.CommandTrees.DbLikeExpression

A new DbLikeExpression with the specified input, pattern and a null escape.

Exception Condition
ArgumentNullException

argument or pattern is null.

ArgumentException

argument or pattern does not have a string result type.


DbExpressionBuilder.Like Method (DbExpression, DbExpression, DbExpression)

Creates a new DbLikeExpression that compares the specified input string to the given pattern using the optional escape.

public static DbLikeExpression Like(
	this DbExpression argument,
	DbExpression pattern,
	DbExpression escape
)

Parameters

argument
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that specifies the input string.

pattern
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that specifies the pattern string.

escape
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An optional expression that specifies the escape string.

Return Value

Type: System.Data.Entity.Core.Common.CommandTrees.DbLikeExpression

A new DbLikeExpression with the specified input, pattern and escape.

Exception Condition
ArgumentNullException

argument, pattern or escape is null.

ArgumentException

argument, pattern or escape does not have a string result type.