In EF Core 8, I’m trying to do this query (Active
is a simple value object of type bool
):
return await _dbSet
.Where(e => e.Active.Value)
.ToListAsync();
And I get:
The LINQ expression ‘DbSet()rn .Where(e
=> e.Active.Value)’ could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation
explicitly by inserting a call to ‘AsEnumerable’, ‘AsAsyncEnumerable’,
‘ToList’, or ‘ToListAsync’. See
https://go.microsoft.com/fwlink/?linkid=2101038 for more information.”
How could I do a linq operation using value objects?
1