DbExpressionBuilder.Like Method
Creates a new DbLikeExpression that compares the specified input string to the given pattern.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() ![]() | Like(DbExpression, DbExpression) | Creates a new DbLikeExpression that compares the specified input string to the given pattern. |
![]() ![]() | Like(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.
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.DbLikeExpressionA 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.DbLikeExpressionA 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. |