I have this seemingly simple linq-to-sql query that searches some data in several columns; something like this:
List TheTableIDs = list of IDs (s
Use 2 where clauses:
List TheTableIDs = list of IDs (sometimes more than 2100)
var _QueryOutput = (from x in TheDataContext.SomeTable
where x.Col1.Contains(SomeString) || x.Col2.Contains(SomeString))
select x.ID).ToList();
var QueryOutput = _QueryOutput.Where(w => TheTableIDs.Contains(w)).ToList();
For efficiency, you could refactor the code so it only does it this way if list contains more than 2000:
if (TheTableIDs.Count() > 2000)
// Code Here
else
// Code Here