Ray's Asp.net Blog
Answers and code snippets from ASP.NET projects (Webforms/MVC/Classic ASP)
Pages
(Move to ...)
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
‹
›
Home
View web version
No comments:
Post a Comment