Created
September 20, 2014 12:13
-
-
Save craftfortress/880529496dfadbfd40ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
statusList = new SelectList(ListNotifications.GroupBy(p => p.Status, (key, g) => key)); | |
Alternative ways to get GroupBy results
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
statusList = new SelectList((ListNotifications.GroupBy(x => new { x.Status }).Select(x => x)),"Status","Status");
statusList = new SelectList(ListNotifications.GroupBy(p => p.Status, (key, g) => new { key}));
statusList = new SelectList(ListNotifications.Select(p => new { p.Status }).Distinct(), "Status", "Status");