語言

SqlServerDbFunctionsExtensions.JsonContains 方法

定義

一個可用於 LINQ 查詢的 DbFunction 方法存根,以鎖定 SQL Server JSON_CONTAINS 函式。

[System.Diagnostics.CodeAnalysis.Experimental("EF9106")]
public static int JsonContains(this Microsoft.EntityFrameworkCore.DbFunctions _, object json, object searchValue, string? path = default, int? searchMode = default);
[<System.Diagnostics.CodeAnalysis.Experimental("EF9106")>]
static member JsonContains : Microsoft.EntityFrameworkCore.DbFunctions * obj * obj * string * Nullable<int> -> int
<Extension()>
Public Function JsonContains (_ As DbFunctions, json As Object, searchValue As Object, Optional path As String = Nothing, Optional searchMode As Nullable(Of Integer) = Nothing) As Integer

參數

_
DbFunctions

DbFunctions 執行個體。

json
Object

用來搜尋的 JSON 值。

searchValue
Object

要搜尋的 JSON 值。

path
String

JSON 路徑用來搜尋。

searchMode
Nullable<Int32>

搜尋模式。

傳回

若 JSON 值包含給定值,則為 1;否則為0。

屬性

備註

更多資訊與範例請參閱「資料庫函數」及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。

適用於