Following is my code. I want to select a specific guest from Guests list of an invitation. But the following code throws the following error. How can I achieve this? I saw in this question there are some similar answers but not sure how to adapt it into EF Core.
Error: "Lambda expression used inside Include is not valid."
invitation = await _dbContext.Invitations
.Include(s => s.Host)
.Include(s => s.Guests.Where(g => g.GuestId.ToString().Equals(model.GuestId)))
.FirstOrDefaultAsync(i => i.InvitationId.ToString().Equals(model.InvitationId));