Monthly Archives: September 2009

Refactoring with Iterators: Prime Factors

Andrew Woodward recently posted a comparison of his test-driven Prime Factors solution to one written by Uncle Bob. In the comments, someone suggested that Andrew use an iterator instead so I thought I’d give it a try. First, let’s repost … Continue reading 

Posted in Iterators, Refactoring | 2 Comments

Hacking LINQ Expressions: Join With Comparer

In this installment of my Hacking LINQ series we’ll take a look at providing an IEqualityComparer for use in a LINQ join clause. The Problem Many of the Standard Query Operators require comparing sequence elements and the default query providers … Continue reading 

Posted in Hacking LINQ, LINQ | Leave a comment

Hacking LINQ Expressions: Select With Index

First, a point of clarification: I use LINQ Expressions to mean (Language-INtegrated) Query Expressions (the language feature) rather than Expression Trees (the .NET 3.5 library in System.Linq.Expressions). So what do I mean by “Hacking LINQ Expressions”? Quite simply, I’m not … Continue reading 

Posted in Hacking LINQ, LINQ | 3 Comments

Functional Construction for ASP.NET Web Forms

System.Xml.Linq (a.k.a. LINQ to XML) introduces a nifty approach to creating XML elements called functional construction. I’m not entirely sure why they call it functional given that constructing an object graph is a decidedly non-functional task in the traditional sense … Continue reading 

Posted in ASP.NET, Functional Construction | Leave a comment

Simplifying LazyLinq

This is the fourth in a series of posts on LazyLinq, a wrapper to support lazy initialization and deferred disposal of a LINQ query context: Introducing LazyLinq: Overview Introducing LazyLinq: Internals Introducing LazyLinq: Queryability Simplifying LazyLinq Introducing LazyLinq: Lazy DataContext … Continue reading 

Posted in ILazyContext, ILazyQueryable, LazyLinq, LINQ, LINQ to SQL, Queryable | Leave a comment