var iquery = (from m in dc.m_MAILBOXes
join o in dc.o_ORGANIZATIONs on m.m_o_ID equals o.o_ID
join h in dc.h_HOSTED_EXCHANGE_ACCOUNTs on o.o_ID equals h.h_o_ID
join my in dc.my_MAILBOX_SUMMARies on m.m_ID equals my.my_m_ID
orderby my.my_START_DATE descending
select new { MailboxName = m.m_NAME, OrgName = o.o_NAME, MailboxStatus = m.m_STATUS,
LatestEndDate = my.my_END_DATE, AccountStatus = h.h_STATUS }).Where(r => r.MailboxName == "test@hetest.com"));
这是我与 where 条件一起使用的查询,不返回任何结果。我完全不确定我哪里出错了。当我删除 where 条件查询返回结果以及邮箱名称等于“test@hetest.com”的条目时。
var result = iquery .Select(var => new MailBoxReconEntry
{
AccountStatus = var.AccountStatus, LatestEndDate = var.LatestEndDate,
MailboxStatus = var.MailboxStatus,
OrgName = var.OrgName
}).ToList();