I'm trying to get a paginated result on a query that currently returns a virtual list resulting from an N:M relationship:
var selectedProfiles = await (from a in _context.USER_PROFILES
where a.Id == id
select a.Followers).FirstOrDefaultAsync();
The thing is: I've tried diferent methods but none works, what i want to archive is:
var selectedProfiles = await (from a in _context.USER_PROFILES
where a.Id == id
select a.Followers.Skip((pageNum - 1) * pageSize).Take(pageSize))
.FirstOrDefaultAsync();
Obviously the code above doesn't work, but my objective should be quite clear. Is there any way to archive this result without querying the N:M table? The DB is the latest build of mariaDB