How to convert this sql query into Linq query?
select *
from setupUOMs as su
LEFT OUTER JOIN scmSKUUoMs as ssu
on su.UoMID != ssu.UoMID
where ssu.SKUID = 446 and su.UMTypeID = 5
Following is the linq query.
from c in setupUOMs
join o in scmSKUUoMs
on c.UOMID equals o.UoMID into sr
from x in sr.DefaultIfEmpty()
where x.SKUID == 446
select x
In above query I've so far only done to extract the join number but what I want is to select the non equal records of left table but I'm able to show joined record. and it returns the records of only left table while my result is based on both columns. In where clause I can access x.SKUID which is from left table but can't access x.UMTypesID which is form right table (Means no column from right table is returned on which I can make condition).