My model is (simplified version):
Album (ID, Name)
Picture (ID, AlbumID, File). Please note the FK to Albums.
I want to write a query to return the most recent albums (top 10), but just the first 5 pictures of each albums.
I wrote:
_context.Albums.Include("Pictures").Take(10).ToList();
In this case, SQL will return the top 10 albums, but ALL pictures for these albums. However in some cases each album may have hundreds of pictures, so I would like a query to limit the number of pictures to 5, for example.