C# 使用Sql函数进行Linq通配符搜索。多列的Pat索引

C# 使用Sql函数进行Linq通配符搜索。多列的Pat索引,c#,linq,C#,Linq,如果我想针对单个列传递通配符,那么使用PatIndex函数可以得到预期的结果: (SqlFunctions.PatIndex("%Precision", rle.ProblemDescription) > 0) 现在,如果我想扫描多个列,下面的方法执行查询效率会很低吗 (SqlFunctions.PatIndex("%Precision", rle.ProblemDescription) > 0) && (SqlFunctions.PatIndex("%Pr

如果我想针对单个列传递通配符,那么使用PatIndex函数可以得到预期的结果:

 (SqlFunctions.PatIndex("%Precision", rle.ProblemDescription) > 0)
现在,如果我想扫描多个列,下面的方法执行查询效率会很低吗

 (SqlFunctions.PatIndex("%Precision", rle.ProblemDescription) > 0)
 &&
 (SqlFunctions.PatIndex("%Precision", rle.RunDescription) > 0)
 &&
 (SqlFunctions.PatIndex("%Precision", rle.ProblemCodes) > 0)

不,我不认为这比需要的效率低。但是,您可能希望在任何列上进行匹配,因此使用
|
而不是
&&
更有意义