So what I want to do is to return a list of all the students personal informations, but i want to do that depending on the value of their status on another table, what should I do, what have now is:
public ActionResult AdminPanel()
{
List<student> status1 = db.students.Where(u => Convert.ToInt32(u.status) == 1).ToList();
return View(db.studentspersonalinformations.OrderBy(u => u.DNI).ToList());
}
What I get as a return there is all the students, but what I want is to get the students that have status 1 on the table "students", I can't put a .Where() since it is from another table and haven't found anything online that could help me