I have a few simple classes that look like this:
Class Favorites Guid UserId Guid ObjectId Class Objects Guid Id String Name
In the Entity Framework, I want to select all objects that the user has marked as favorites.
So, I tried something like this
context.Objects.Where( x => x.Id == context.Favorite.Where(f => f.UserId == UserId) .Select(f => f.ObjectId).Any() );
But I do not understand. I also tried with intersection, but I understand that this is the most similar type. One user can have many favorites.
source share