8
shouts

LINQ Group By with NULL database values

published 584 days, 1 hour, 5 minutes ago posted by http://vistadb.myopenid.com/http://vistadb.myopenid.com/ 584 days, 23 hours, 55 minutes ago
Tuesday, July 06, 2010 2:39:43 PM GMT Monday, July 05, 2010 3:50:11 PM GMT

LINQ is fantastic for the ability to write queries that express intent much more clearly than the same SQL, or structured code.  One problem that I have run into though is handling NULL database values that are part of a group by statement.  Grouping by ProductSKU Grouping in LINQ allows you to return sets of data from a collection for a given key value.  The group by clause is what the key ends up being in the result set.  Lets take a grouping of the Products by the SKU.from p in Products group p ...

category: SQL | clicked: 7 | | source: infinitecodex.com | show counter code
tags: Group by, Linq, SQL, VistaDB