SqlServerDbFunctionsExtensions.PatIndex(DbFunctions, String, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回指定表达式中模式的第一个匹配项的起始位置;如果未找到模式,则返回所有有效文本和字符数据类型上的零。
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
参数
DbFunctions 实例。
- pattern
- String
要搜索的字符串模式。
- expression
- String
通常为搜索指定模式的列
返回
返回指定表达式中模式第一次出现的起始位置。
注解
有关详细信息和示例,请参阅数据库函数以及使用 EF Core 访问SQL Server和Azure SQL数据库。