Hi, I just was wondering if I can perform a Query just like that:
What I have tried:
List <studentclasslist> = _context.StudentClass
.Where(sc => sc.ClassId == 1)
.ToList();
List<int> studentIdList = new List<int>();
foreach (var student in studentClassList )
{
studentIdList = _context.Student.Where(st => st.Id == student.StudentId).ToList();
}
Thanks in advance.