Ray's Asp.net Blog
Answers and code snippets from ASP.NET projects (Webforms/MVC/Classic ASP)
Pages
Event registration app with QR/Paypal
Home
Wednesday, August 1, 2012
How to select unique class list by one property in LINQ? like DISTINCT in TSQL
classList.GroupBy(prop => prop.Id).Select(group => group.FirstOrDefault()).ToList()
http://rayaspnet.blogspot.ca/2011/08/how-to-implement-sql-distinct-keyword.html
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment