As I mentioned Monday and in my Visual Studio 2008 review, I've been struggling with the finer points of LINQ queries. In a talkback comment to my review, "CSharper" pointed me at one solution to finding the LINQ equivalent of a SQL "SELECT DISTINCT" query: tack on a LINQ .Distinct() method call to the query, which needs to be enclosed in parentheses. That worked, but it destroyed the sort order created by a pre As I mentioned Monday and in my Visual Studio 2008 review, I’ve been struggling with the finer points of LINQ queries. In a talkback comment to my review, “CSharper” pointed me at one solution to finding the LINQ equivalent of a SQL “SELECT DISTINCT” query: tack on a LINQ .Distinct() method call to the query, which needs to be enclosed in parentheses. That worked, but it destroyed the sort order created by a previous orderby clause. Obviously, I also had to learn to use the LINQ .OrderBy() method so that I could apply the sort after the sift. That was a little harder, since .OrderBy() takes a lambda expression, and I wasn’t yet familiar with that new C# syntax. Nevertheless, I got it working. It isn’t beautiful, but this is really version 1.0 of LINQ. var qAV = (from ai in db.AppInfos join acai in db.AppCatAIs on ai.Prodid equals acai.Prodid join ac in db.AppCategories on acai.acatid equals ac.acatid where ac.Category == category1 || ac.Category == category2 select ai) .Distinct() .OrderBy(n => n.ProductName); Software Development