Stupid Linq Tricks Record Rollup
Ive been in these situations too many times where Ive had to receive a logical document and the "text" has been split across multiple items in a list. Most of the time it occurs with databases but Ive had to do the same thing with B2B integrations with Xml too.
Before Linq Id end up with the prototypical foreach code but this last time I need to (re)solve such a problem Linq had since been born.
Here is an example:
Big deal. What if you have a set of data that has multiple comments
Here are the static helper methods I used to kruft up some sample data if you would like to play around with these queries
I do realized that ORM and other database queries have the ability to do these aggregates for you. I was merely trying to point out some Linq tricks for those situations where you are dealing with objects and might not be in a data access situation.
File under: Linq So Eric Remembers- Internet Explorer is like
- I Quit My Job And We Are Moving Home To Montana
- LINQPad with Databases
- Getting started with MVCContrib Filters
- Extension Methods Improving the quality of Life
- C4MVC Reason 42 to Join
- Checking for special characters using LINQ
- Asp net MVC Session State Extension Method
- Unit Testing Just Do It
- Blog.Start
Posts
- 07 Jun 2010 Internet Explorer is like
- 06 May 2010 I Quit My Job And We Are Moving Home To Montana
- 17 Apr 2010 LINQPad with Databases
- 01 Apr 2010 Stupid Linq Tricks Record Rollup
- 30 Mar 2010 Getting started with MVCContrib Filters
- 23 Mar 2010 Extension Methods Improving the quality of Life
- 22 Mar 2010 C4MVC Reason 42 to Join
- 13 Mar 2010 Checking for special characters using LINQ
- 09 Mar 2010 Asp net MVC Session State Extension Method
- 08 Mar 2010 Unit Testing Just Do It
- 15 Feb 2010 Blog.Start