1
我有一个警告表,它具有1:多映射到设备。这种关系是在一个映射表中传递的。当我尝试产生从映射表到各种资产类型表的左外连接时,出现以下错误:System.Security.VerificationException:操作可能会破坏运行时的稳定性。左外连接上的Linq错误
var alertAssets = (from a in dc.MSAlert_Assets
from b in dc.MSRfids.Where(x => x.accountID == a.accountID && x.rfID == a.tagNum && x.custNum == a.custNum).DefaultIfEmpty()
from c in dc.MSDevices.Where(x => x.accountID == a.accountID && x.deviceID == a.deviceID).DefaultIfEmpty()
from d in dc.MSGroups.Where(x => x.accountID == a.accountID && x.groupID == a.groupID).DefaultIfEmpty()
let x = grrepo.getAssetsForGroupID(d.groupID, d.accountID)
where a.alertID == alertID
select new {... specific objects}
我想这可能是一个缩小的问题,所以我Enumarated的IQueryable的,但还是同样的问题。
你试过使用连接而不是from和where子句 – 2010-09-29 16:56:55