I have a hashset of strings representing tmdbId for the movies that I have on disk - called movieOnDisk.
I have a movie object database indexed by tmdbId .
I want to delete records that exist in the database but do not exist on disk.
I have this line to get the difference:
var toDelete = Database.Movies.Where(x => !moviesOnDisk.Contains(x.TMDbId));
this gives me no results and the following message:
The 'Boolean Contains (System.String)' method does not support translating to SQL.
Is there any work for this? Obviously, I can iterate over both lists, but I'm going to get maximum performance.
source share