SqlServerDbFunctionsExtensions.PatIndex(DbFunctions, String, String) 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.
Returns the starting position of the first occurrence of a pattern in a specified expression, or zero if the pattern is not found, on all valid text and character data types.
public static long PatIndex (this Microsoft.EntityFrameworkCore.DbFunctions _, string pattern, string expression);
static member PatIndex : Microsoft.EntityFrameworkCore.DbFunctions * string * string -> int64
<Extension()>
Public Function PatIndex (_ As DbFunctions, pattern As String, expression As String) As Long
Parameters
The DbFunctions instance.
- pattern
- String
A string pattern to search for.
- expression
- String
Typically a column that is searched for the specified pattern
Returns
Returns the starting position of the first occurrence of a pattern in a specified expression.
Remarks
See Database functions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.