我试图使用defaultIfEmpty连接三个表,如果第二个表中没有匹配则分配空值,然后我使用第二个表值来连接第三个表。
var test = (from Eqpt in Eqpts
join SystemEqpt in FleetSysEqpt on SystemEqpt.ID equals eqpt.SwCompanyEqptKey into sysEqptTemp
from a in sysEqptTemp.DefaultIfEmpty()
join System in System on a.SwFleetSystemKey equals System.ID
)
当' a'我得到空对象引用错误。变为空。任何建议,以检查是否' a'加入时为null。
答案 0 :(得分:0)
您只需添加this
条件
var MyModule = (function ($) {
var self = {};
var privateFunction = function () {
console.log(self);
}
self.init = function () {
privateFunction(); // exposes all the public methods of self, keeping the "private" functions private
};
return self;
}(jQuery));
MyModule.init();