There's a number of ways to handle this, but which is appropriate depends on the relationship, or lack there of, between these entities, which you haven't disclosed.
First, let's take the basic example of having an actual relationship. Assuming you had something like:
public class Employee
{
public int EmployeeID { get; set; }
public string Name { get; set; }
public int DirectorId { get; set; }
public virtual Director Director { get; set; }
}
In other words, there's a one-to-many between Employee and Director where an employee has one director and a director has many employees, then in your action you can do:
db.Employees.Where(x => x.DepartmentID == 1 && x.DirectorId == 2).Include("Director");
Which will net you a list of employees, each with a Director instance accessible through the Director property on Employee. You could then work with either the Employee instance or the Director instances off of each Employee instance at will in your view.
If there's not a direct relationship, then you need to query each separately and combine them in a view model. For example:
public class EmployeesDirectorViewModel
{
public List<Employee> Employees { get; set; }
public Director Director { get; set; }
}
Then in your action:
var employees = db.Employee.Where(x => x.DepartmentID == 1);
var director = db.Directors.Where(x => x.DirectorID == 2);
var model = new EmployeesDirectorViewModel
{
Employees = employees,
Director = director
}
return View(model);
However, it should be noted that since we're assuming there's no direct relationship in this example, there's no way to filter the employees by which director they belong to.
A third option is a combo of the previous to. Even if you have a direct relationship between an employee and a director, you can still use a view model to better organize your data. The goal of a view model is to optimize the data for what the view needs, so you can include subsets of properties, additional properties not on the entities, calculations and aggregations, etc.
Finally, it's possible there might be a relationship, just not a direct one. For example, you might have something like:
public class Employee
{
...
public int DepartmentID { get; set; }
public virtual Department Department { get; set; }
}
public class Department
{
...
public int DirectorID { get; set; }
public Director Director { get; set; }
}
You can handle this in a very similar way to my first example, you just need to traverse the relationship in your query:
db.Employees.Where(x => x.DepartmentID == 1 && x.Department.DirectorId == 2)
.Include("Department.Director");
Now, that example is contrived because if you're selecting the department by id, there's no point in further conditioning it with a particular director as well. The director is either the director or it's not.