Hi I\'m using linq to entity in my application. I need to get distinct records based on one column value \"Name\"
So I have a table similar like you can see below:>
Hi here is how you can select distinct records with inner join. Hope it helps
var distinctrecords = (entity.Table.Join(entity.Table2, x => x.Column, y => y.Column, (x, y) => new {x, y}) .Select(@t => new {@t.x.Column2, @t.y.Column3})) .GroupBy(t => t.Column2) .Select(g => g.FirstOrDefault());