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;
This is the MVC LinQ query, How do write this join query in sails js.
Three different models are used here: (LookUpType,LookUp,OBSSetting).
Anyone please guide to do this task.
Thanks in advance....