Finally, An example of a Multi tier architecture for Linq to Sql

Update 2/6/2008:

The original post for this is available  beneath, but the link to the original article has been removed which turns this post to a pointless rant because you cannot reference the article. Luckily Beth Massi has a very good n’tier Linq example.


Anyone that is aware of my posts knows that I do whinge about the lacklustre implementability of Linq in real world scenarios. I have battled with this for some time now.

Microsoft’s response a few months back was that they were waiting to see how their customers would ‘conjure up’ a method of doing this.
I found this attitude dissatisfactory, because if you’re trying to negate the impedance mismatch between ‘objects’ and ‘data’, the ubiquitous scenario is n-tier. You cannot introduce such a feature (Linq), and not have examples of it being implemented n-tier.
I have just come across an example of implementing Linq to Sql on MSDN. The link is available here.

I have finished testing this and quite frankly, I’m very disappointed. This is not easier than datasets, but more complex, for absolutely no ROI for understanding the raised abstraction.
Validation is pain, even more painful is moving this to winforms/wpf applications, that do not have the object data source.

I keep returning to Linq because of all the noise Microsoft made. Indisputably, one is more expressive when composing queries, but that is just one small part in creating an n-tier app.

Nah, back to datasets for me, and quick. Unless a miracle happens.

2 thoughts on “Finally, An example of a Multi tier architecture for Linq to Sql

  1. This solution is not supposed to be ‘easier than datasets’ it’s supposed to give you a properly separated datalayer which it does. Just because something is easier doesn’t necessarily make it desirable.
    I should also point out that this solution is aimed specifically at Asp.Net applications, so your complaint about winforms is missing the point a bit.
    Just my 2 cents…

  2. If you want a clean seperate data layer look at the first two lessons at I have built smart and web clients to this architecture, your data layer should be ‘client’ agnostic.

    At this moment in time Linq is immature and not suited to n-tier applications. I have just lost money building an application with it. The fact that you are having to ‘conjure up’ an implementation, and Microsoft have not, speaks volumes to me.

    Yes Linq is powerful, but for business, I will wait for the ADO.NET entity framework (Astoria).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s