The problem is that you create your data context and then fire it:
using (var ctx = Database.AccountingContext())
To make this happen, try instead:
ObjectContext context = Database.AccountingContext(); public static IQueryable<User> SelectFromEmployee(int employee) { return context.Users.Where(c => c.Employee_FK == employee); }
What I did here is that I moved the Data Context outside the method instead, now the problem is that you need to manage it yourself, and you may also need to consider that you are blocking more connections, so be sure to establish a connection .
Edit
I assumed that you also wanted to use relationships, etc.
source share