My guess is that error indicates that EF cannot translate the equality operator for Employee
to SQL (regardless of whether you're assuming referential equality or an overridden ==
operator). Assuming the Employee
class has a unique identifier try:
var query = from a in db.Activities
where a.AssignedEmployeeId == currentUser.Id
where a.IsComplete == false
orderby a.DueDate
select a;
return View(query.ToList());
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…