Join in LINQ and Entity Framework
You can also use method syntax:
var query = table1.Join(table2,
a => a.code,
b => b.vcode,
(a,b) => a.col1)
.Distinct();
var result = (from a in table1
join b in table2 on a.code equals b.vcode
select a.col1).Distinct();