Both
a_query
and
b_query
are
List<UTILITY.cl_PRIVACY>
.
You are trying to test whether one of those lists contains an
int
. But it can't - the list contains instances of your class, not
int
s.
You're also referencing undeclared variables
A
,
B
, and
C
in your projection for
c_query
.
If you're using .NET 6, you can use
the new ExceptBy
method[
^]:
c_query = a_query.ExceptBy(b_query.Select(b => b.id_per), a => a.id_per).ToList();
For older versions, you'll need something like this:
c_query = a_query.Where(a => !b_query.Any(b => b.id_per == a.id_per)).ToList();