伙计们,我正在编写代码,我需要做一个独特的选择,即仅选择2列。你们能告诉我这段代码有什么问题吗?
foreach (var lbd in (from lbdrow in Db.LaborDtl
where (lbdrow.Company==epged.Company && epged.EmpID==lbdrow.EmployeeNum && lbdrow.PayrollDate==epged.PayrollDate)
select new {Company==lbdrow.Company && ProjectID==lbdrow.ProjectID})).Distinct()
答案 0 :(得分:0)
对我找到解决方案的愚蠢问题表示歉意
foreach (var lbd in (from lbdrow in Db.LaborDtl
where (lbdrow.Company==epged.Company && epged.EmpID==lbdrow.EmployeeNum && lbdrow.PayrollDate==epged.PayrollDate)
select new {Company==lbdrow.Company && ProjectID==lbdrow.ProjectID}).Distinct())