📜  linq 查询两个条件 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:55.859000             🧑  作者: Mango

代码示例1
on new { t1.ProjectID, SecondProperty = true } equals 
   new { t2.ProjectID, SecondProperty = t2.Completed } into j1
   
from t1 in Projects
from t2 in Tasks.Where(x => t1.ProjectID == x.ProjectID && x.Completed == true)
                .DefaultIfEmpty()
select new { t1.ProjectName, t2.TaskName }