The common problem in object-oriented design and implementation
http://www.johndcook.com/blog/2011/07/19/you-wanted-banana/
Tuesday, August 30, 2011
Monday, August 29, 2011
How to implement SQL Distinct keyword in LINQ?
There is a Distinct keyword in LINQ, but not as same as in SQL.
Following is the same implementation for SQL distinct in LINQ
var distinctItems = items
Following is the same implementation for SQL distinct in LINQ
var distinctItems = items
.GroupBy(x => x.PropertyToCompare)
.Select(x => x.First());
http://blog.jordanterrell.com/post/LINQ-Distinct()-does-not-work-as-expected.aspx
HOW TO GET DISTINCT VALUES FROM THE LIST<T> WITH LINQ
HOW TO GET DISTINCT VALUES FROM THE LIST<T> WITH LINQ
Subscribe to:
Posts (Atom)