Entity Framework : include only one row of each reference id

Viewed 50

I need to include only the first row of Comments for each BlogPost. How I can do that?

This code here includes every comment:

var query = _inventoryContext.BlogPosts
                             .Include(x => x.Comments)
                             .AsQueryable();
0 Answers
Related