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