6
var obsType = (from lk in db.LookUp
join
lt in db.LookUpType
on
lk.LookUpTypeId equals lt.LookupTypeId
where (lt.FieldName == "OBSType")
&&
!(db.OBSSetting.Select(k => k.OBSTypeId)).Contains(lk.Id)
orderby
(lk.SortOrder ?? decimal.MaxValue)
select new LookUpViewModel
{
Id = lk.Id,
Description = lk.Description
}).ToList();
return obsType;
Đây là truy vấn MVC LinQ, Cách viết truy vấn tham gia này trong buồm js.Sails.js: Tham gia
Ba mô hình khác nhau được sử dụng tại đây: (LookUpType, Tra cứu, OBSSetting).
Bất kỳ ai vui lòng hướng dẫn thực hiện tác vụ này.
Cảm ơn trước ....
Codeformat để hiển thị truy vấn không tốt. –