I have a quite big list of strings (30k+) and I need to check which ones do not exist on a table using Entity Framework Core.
Something like this but without sending a request per item to check:
var notFoundItems = hugeList.Where(c => !tableToCheck.Any(x => x.Id == c)).ToList();
I found an answer but using T-SQL
Since you already have a T-SQL solution, this is a good case for using a Raw SQL Query. There will certainly be cases where a SQL query cannot be expressed in LINQ or the LINQ statement doesn't generate an optimized query.