問題:
I'm trying to filter on the initial query.我正在嘗試過濾初始查詢。 I have nested include leafs off a model.我在模型上嵌套了包含葉子。 I'm trying to filter based on a property on one of the includes.我正在嘗試根據其中一個包含的屬性進行過濾。 For example:例如:
using (var context = new BloggingContext())
{
var blogs = context.Blogs
.Include(blog => blog.Posts)
.ThenInclude(post => post.Author)
.ToList();
}
How can I also say .Where(w => w.post.Author == "me")
?我怎麼還能說.Where(w => w.post.Author == "me")
?