I have the following problem. I am new to using LINQ in C# and I have the following code:
var empleado = db.Employees.Where(x => x.EmployeeID ==numReloj).ToList();
var ID = empleado[0].ID;
var employeec = db.Employee_Course.Where(x => x.ID_EMPLEADO == ID).ToList();
var idcourse = employeec[0].ID_CURSO;
var cursos = db.Courses.Where(x => x.ID_CURSO == idcourse).ToList();
Here what the code does is take into account the employee's clock number and I need to see what courses they have, but the idcourse variable only grabs the first element. You know how I can make it go through all the data in that table.