'Need assistance in getting data from 3 dto tables using IQUERYABLE in .NET...Beginning Developer

I will use this example:

Lets take a Teacher, Class, Students Example.

There is a Teacher table, Class table and Students table. With that there are three DTOs that are autogenerated from the database into EF:

TeacherDto, ClassDto, StudentsDto

Dto I made up to combine the tables:

TCSDto:

namespace

{

 public class TCSDto
  {
        public TeacherDto Tdto {get;set;}

        public ClassDto Cdto {get;set;}

        public StudentsDto Sdto {get;set;}
   }

}

If I want to get all the students who have the same classes with a particular teacher how would I approach that with IQueryable? Because you would have to query all three tables.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source