Include(), , , "" .
using (var context = new YourContext())
{
var categories = from c in context.Categories.Include("Posts")
where c.Posts.Any((p)=>p.Name == "Linq")
select c;
}
- :
context.Categories
.Select(c => new {
Category = c,
Posts = c.Posts.Where(p => p.Name == "Linq")
}).AsEnumerable()
.Select(cp => cp.Category);
, .