Subquery with “ANY” and local array generate nested too deep SQL Statement
问题 public IEnumerable<Table1> GetMatchingTable1(string param, double[] Thicknesses) { return DBContext.Table1.Where(c => c.Field1 == param && Thicknesses.Any(Thickness => Thickness >= c.MinThickness && Thickness <= c.MaxThickness)) .ToList(); } Above query return the following exception. "Some part of your SQL statement is nested too deeply. Rewrite the query or break it up into smaller queries." So far, all my research on the web for this error pointed toward replacing "ANY" with "CONTAINS".