SqlServerDbFunctionsExtensions.JsonContains Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A DbFunction method stub that can be used in LINQ queries to target the SQL Server JSON_CONTAINS function.
[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
Parameters
The DbFunctions instance.
- json
- Object
The JSON value to search.
- searchValue
- Object
The JSON value to search for.
- path
- String
The JSON path to search within.
Returns
1 if the JSON value contains the given value; otherwise 0.
- Attributes
Remarks
See Database functions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.