LINQ in Action roller

Distinct and orderby ?

I have a LINQ query that queried 6 tables with inner joins, a where clause and with an orderby clause. The orderby clause ordered on three columns in turn. It all worked wonderfully well, apart from one little thing. Dut to the data in the database, it was returning several duplicate rows. So, I thought I'd use the equivalent to a SELECT DISTINCT. The syntax goes from: var query = a from tableA, ....... select new {x} ; to var query = (a from tableA, ....... select new {x})Distinct() ; Okay, this Read More...
Published Wednesday, April 30, 2008 8:37 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication