{STATIC} hippo

...on becoming a great developer...
posts - 39, comments - 14, trackbacks - 0

My Links

Archives

Post Categories

April 2010 Blog Posts

OrderToList: Fix for LINQ-to-SQL Order dilemma

  UPDATE: I’ve cleaned up the code a bit and put it up on CodePlex at http://ordertolist.codeplex.com/   A team member recently wanted LINQ-to-SQL to perform a query with a Contains() clause and return the results in the same order.  For example, he was passed a list of People: 1: List<int> idsOfPeopleToDisplay = new List<int> { 578, 291, 788, 230, 45 }; and he wanted to select all People from the database with those IDs, in that order.  The following will result in a non-correctly ordered...

posted @ Wednesday, April 07, 2010 5:04 PM | Feedback (0) | Filed Under [ c# Linq2Sql ]

Powered by:
Powered By Subtext Powered By ASP.NET