อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


DbExpressionBuilder.Like Method

Definition

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

Overloads

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.

Like(DbExpression, DbExpression)

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

C#
public static System.Data.Common.CommandTrees.DbLikeExpression Like(this System.Data.Common.CommandTrees.DbExpression argument, System.Data.Common.CommandTrees.DbExpression pattern);

Parameters

argument
DbExpression

An expression that specifies the input string.

pattern
DbExpression

An expression that specifies the pattern string.

Returns

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

Exceptions

argument or pattern is null.

argument or pattern does not have a string result type.

Applies to

.NET Framework 4.8.1 และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Like(DbExpression, DbExpression, DbExpression)

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

C#
public static System.Data.Common.CommandTrees.DbLikeExpression Like(this System.Data.Common.CommandTrees.DbExpression argument, System.Data.Common.CommandTrees.DbExpression pattern, System.Data.Common.CommandTrees.DbExpression escape);

Parameters

argument
DbExpression

An expression that specifies the input string.

pattern
DbExpression

An expression that specifies the pattern string.

escape
DbExpression

An optional expression that specifies the escape string.

Returns

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

Exceptions

argument, pattern or escape is null.

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

Applies to

.NET Framework 4.8.1 และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1