public async Task <List <LkStudent> > GetCustomStudentList(StudentSelectionModel sm) { IQueryable <LkStudent> query = _db.Students .Include(d => d.StudentSkills).ThenInclude(p => p.Skill) .Include(x => x.Group).ThenInclude(p => p.Subjects).ThenInclude(c => c.Subject) .Include(x => x.Group).ThenInclude(p => p.FacultySection).ThenInclude(c => c.Faculty) .Include(x => x.Group).ThenInclude(p => p.Subjects).ThenInclude(c => c.LkTeacher) .Include(x => x.Portfolio) .Include(x => x.Thumbnail) ; query = new QueryBuilder(sm, query).getQuery(); return(await query.AsNoTracking().ToListAsync()); }
public QueryBuilder(StudentSelectionModel sm, IQueryable <LkStudent> query) { _sm = sm; _query = query; }