background preloader

LINQ

Facebook Twitter

DesignPatterns

Providers. Staccato Signals: Being Ignorant with LINQ to SQL. Before we begin Most of the code here was written on the May 2006 CTP.

Staccato Signals: Being Ignorant with LINQ to SQL

That’ s just because I am moving house and do not have access to my Orcas beta at the moment. It is also a preliminary discussion that I hope will be followed by more detailed analysis, as time permits. Models and Ideologies LINQ to SQL differs from LINQ to Objects in that it is about working with objects that are persistent; in other words have a lifetime beyond the application. K. Scott Allen : Trying Out Persistence Ignorance with LINQ (Par. In June, Ian Cooper wrote an article (Being Ignorant With LINQ to SQL) that provided marvelous details about using POCOs with persistence ignorant repositories.

Ian's conclusion: "LINQ to SQL is usable with a TDD/DDD approach to development. Indeed the ability to swap between LINQ to Objects and LINQ to SQL promises to make much more of the code easily testable via unit tests than before. " I've been tinkering along the same lines as Ian, and although I think I started working at the other end of the problem first, I'm reaching the same conclusions (and ended up with much of the same code).