DbFunctionsExtensions.Like 方法

定義

多載

Like(DbFunctions, String, String)

SQL LIKE 作業的實作。 在關係資料庫上,這通常直接轉譯為 SQL。

Like(DbFunctions, String, String, String)

SQL LIKE 作業的實作。 在關係資料庫上,這通常直接轉譯為 SQL。

Like(DbFunctions, String, String)

SQL LIKE 作業的實作。 在關係資料庫上,這通常直接轉譯為 SQL。

public static bool Like (this Microsoft.EntityFrameworkCore.DbFunctions _, string matchExpression, string pattern);
public static bool Like (this Microsoft.EntityFrameworkCore.DbFunctions _, string? matchExpression, string? pattern);
static member Like : Microsoft.EntityFrameworkCore.DbFunctions * string * string -> bool
<Extension()>
Public Function Like (_ As DbFunctions, matchExpression As String, pattern As String) As Boolean

參數

_
DbFunctions

DbFunctions 執行個體。

matchExpression
String

要比對的字串。

pattern
String

可能涉及萬用字元 的 %,_,[,],^ 模式。

傳回

true 如果有相符專案,則為 。

備註

請注意,比較的語意將取決於資料庫組態。 特別是,它可能是區分大小寫或不區分大小寫。

這個 DbFunction 方法沒有記憶體內部實作,如果查詢切換至用戶端評估,則會擲回 。 如果查詢包含一或多個無法轉譯至存放區的運算式,就會發生這種情況。

適用於

Like(DbFunctions, String, String, String)

SQL LIKE 作業的實作。 在關係資料庫上,這通常直接轉譯為 SQL。

public static bool Like (this Microsoft.EntityFrameworkCore.DbFunctions _, string matchExpression, string pattern, string escapeCharacter);
public static bool Like (this Microsoft.EntityFrameworkCore.DbFunctions _, string? matchExpression, string? pattern, string? escapeCharacter);
static member Like : Microsoft.EntityFrameworkCore.DbFunctions * string * string * string -> bool
<Extension()>
Public Function Like (_ As DbFunctions, matchExpression As String, pattern As String, escapeCharacter As String) As Boolean

參數

_
DbFunctions

DbFunctions 執行個體。

matchExpression
String

要比對的字串。

pattern
String

可能涉及萬用字元 %_,[,],^的模式。

escapeCharacter
String

逸出字元 (做為單一字元字串,) 在 %_,[,],^ 的前面,如果未當做萬用字元使用。

傳回

true 如果有相符專案,則為 。

備註

請注意,比較的語意將取決於資料庫組態。 特別是,它可能是區分大小寫或不區分大小寫。

這個 DbFunction 方法沒有記憶體內部實作,如果查詢切換至用戶端評估,則會擲回 。 如果查詢包含一或多個無法轉譯至存放區的運算式,就會發生這種情況。

適用於