2
IEnumerable<ViewEmployees> us = from u in db.Users
join s in db.Designations
on new { id = u.DesignationID } equals new { id = s.DesignationID }
select new ViewEmployees
{
EmployeeName = u.Name,
EmployeeID = u.Id,
EmployeeCode = u.UserName,
Designation = u.DesignationID,
DesignationName = s.DesignationName,
};
它顯示了所有的記錄,但我希望看到除1中的所有記錄..這是當前用戶ID如何顯示所有員工除了使用Linq?
...'在哪裏u.Id!= CurrentUser.Id' ... – Jehof
你是什麼意思是當前用戶ID? –
爲什麼要爲平等比較創建匿名類型? –