EF Core 3.0 can not load a List of entities, when using a hashset
Hi,
I'm using ef core 3.0 now and get errors where ef core 2.1 was doing everthing okay.
I have two Entities: A and B, A can have multiple Bs
var aIDs = ListOfBs.Select(b => b.aID)).ToHashSet();
var listOfA = await _context.A .AsNoTracking() .Where(a => aIDs .Contains(a.ID)) .ToListAsync();
Now I get here an Error! However If I change the Code to:
var aIDs = ListOfBs.Select(b => b.aID)).ToHashSet().ToList();
var listOfA = await _context.A .AsNoTracking() .Where(a => aIDs .Contains(a.ID)) .ToListAsync();
The Code works again. Could it be that we cannot use HashSets in a where statement with ef core 3.0 ?
I'm using the HashSet to get rid of duplicate IDs. In the original programm I can have mutiple duplicate IDs of A ...
Duplicate of #17342