how do i create the dry query logic between ienumerable and queryable?

As suggested in the comments by, I just had to use:

dbContext.EntityTwos
    .Where(e2 => e2.EntityOnes
        .AsQueryable()
        .Where(expression).Any())
    .FirstAsync();

where expression is an Expression<Func<EntityOne, bool>>.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top