LINQ vs Methodized Syntax

Recently we had a debate about which way we prefer to see Linq syntax written.  In the LINQ from/select syntax below:

Linq Code

Or, in the Methodized syntax which follows:

Methodized Syntax

I personally prefer the more methodized syntax where it can be used typically (esspecially when the statement contains only a simple where clause).  However it is worth noting that the Join method which takes in four seperate parameters is quite painful to write against, the inferred generics do not properly pick up what you are working with until you finish the entire statement.  I threw together a more "english friendly" syntax which also has the added benefit of allowing generics to properly infer at each step of the way.

Finished Syntax

Now granted some people will argue this syntax takes up "more lines", you could put some of these method calls onto one line if you felt it really necessary.  I've included the small sample of source code which you can get here.

Print | posted @ Monday, March 03, 2008 1:41 AM

Comments on this entry:

Gravatar # re: LINQ vs Methodized Syntax
by Matt Casto at 3/4/2008 1:30 PM

I'd disagree with you if I could read your code.
Gravatar # re: LINQ vs Methodized Syntax
by Dan Shultz at 3/4/2008 2:25 PM

Nice... I may be able to apply it to the Region/Jurisdiction feature.

And I'm with Matt on the readability...I need an Excedrin now.
Gravatar # re: LINQ vs Methodized Syntax
by Kris Scott at 3/4/2008 3:17 PM

Yeah, it looked a lot better when I took the screen shots, I'm going to try moving to a CSS style code pasting utility. Should help.
Gravatar # re: LINQ vs Methodized Syntax
by Brenton at 7/2/2010 4:42 AM

Thank you very much!
Gravatar # re: LINQ vs Methodized Syntax
by Biber hapi at 7/8/2010 7:25 AM

Interesting, Keep up the good work,
Thanks for writing, most people don't bother.
Gravatar # re: LINQ vs Methodized Syntax
by online casino at 6/11/2011 4:22 AM

Good post. I always visit your site and found lots of beautiful work. Thanks for your all efforts that you do for it
Gravatar # re: LINQ vs Methodized Syntax
by skill games at 6/16/2011 4:40 AM

Thanks a lot for the information. It's really useful.
Gravatar # re: LINQ vs Methodized Syntax
by Phone-4g Blog at 7/5/2011 5:36 PM

thank you for posting. I've found the answer to my question.
Gravatar # re: LINQ vs Methodized Syntax
by traders insurance at 7/19/2011 9:19 AM

Good info, do you know where I can find out a little more about this, thanks for sharing it.
Gravatar # re: LINQ vs Methodized Syntax
by steel traders at 7/27/2011 1:27 PM

The site was informative and contain useful content for the visitors. It got good posts as well. I will bookmark this site for future viewing. Thanks for sharing.
Gravatar # re: LINQ vs Methodized Syntax
by kindle 3 vs kindle 4 at 10/9/2011 7:15 AM

Good to share with us...
Gravatar # re: LINQ vs Methodized Syntax
by social media consulting at 10/11/2011 9:36 AM

Its new way to coding....I will use this code in placed of old one. thanks
Gravatar # re: LINQ vs Methodized Syntax
by villa cote d azur at 10/12/2011 5:39 PM

I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end.
Gravatar # One Time Credit Report
by One Time Credit Report at 10/14/2011 10:27 AM

thanx for sharing thanx admin
Gravatar # Toronto escorts
by Toronto escorts at 10/15/2011 1:03 AM

your posr very nice
Gravatar # re: LINQ vs Methodized Syntax
by Atlanta escorts at 10/15/2011 9:09 AM


I have gone through them,they gave me all sorts of important things that are related to my subject.
Gravatar # online fighting games
by online fighting games at 10/17/2011 5:22 AM

thanx for post
Gravatar # lenovo z370 13.3 inch notebook review
by lenovo z370 13.3 inch notebook r at 10/20/2011 6:37 AM

I can find out a little more about this thanx 20ry nice
Gravatar # re: LINQ vs Methodized Syntax
by starting a blog at 10/26/2011 10:41 AM

starting a blog
Gravatar # re: LINQ vs Methodized Syntax
by windows 8 review at 10/26/2011 10:41 AM

windows 8 review
Gravatar # re: LINQ vs Methodized Syntax
by pacquiao vs marquez at 11/5/2011 11:02 AM

The only reason why we ask other people how their weekend was is so we can tell them about our own weekend.
Gravatar # re: LINQ vs Methodized Syntax
by Barcode generator at 11/8/2011 11:31 PM

You make it entertaining and you still manage to keep it smart. I can’t wait to read more from you. This is really a great blog.
Gravatar # re: LINQ vs Methodized Syntax
by gps reviews at 11/8/2011 11:51 PM

Hello, this is my first time i visit here. I found so many interesting in your blog especially on how to determine the topic. Keep up the good work.
Gravatar # kindle fire black friday
by kindle fire black friday at 11/12/2011 5:21 AM

aaaaaaaaaaaaa
Gravatar # re: LINQ vs Methodized Syntax
by bednextday at 11/14/2011 1:03 AM

Get a quality range of leather beds in all sizes from Bed Next Day. You can get Cosmo Faux Leather Bed Prado Faux Leather Bed Frame and many more leather beds in UK.

Leather Bed
Gravatar # Black Friday 
by Black Friday  at 11/14/2011 10:35 AM

sssBlack Friday 

Gravatar # Black Friday Kindle 
by Black Friday Kindle  at 11/14/2011 11:09 AM

vbvBlack Friday Kindle 
Gravatar # Kindle Fire Black Friday 
by Kindle Fire Black Friday  at 11/14/2011 11:22 AM

bnnbKindle Fire Black Friday 
Gravatar # kindle 4 black friday
by kindle 4 black friday at 11/16/2011 12:39 PM

kindle 4 black friday
Gravatar # kindle touch black friday
by kindle touch black friday at 11/16/2011 12:43 PM

kindle touch black friday
2
Gravatar # bulgariaonlinecasino.com
by bulgariaonlinecasino.com at 11/22/2011 9:57 PM

The finest choice of blog subject on net I think your blog is the greatest blog I found on the net. Keep going like this on net and make us enjoyable through your writing skill on net.
Gravatar # re: LINQ vs Methodized Syntax
by Software application development at 12/23/2011 4:40 AM

The post is written in very a good manner and it entails much useful information for me. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand how to make comedy tour. Thank you for the post.
Gravatar # re: LINQ vs Methodized Syntax
by kondilomi slike at 12/23/2011 7:12 AM

Appreciate your insights here, keep up the great work.

Izreke,Mrsavljenje
,Kupus dijeta,Dijete
Gravatar # re: LINQ vs Methodized Syntax
by Child therapy at 12/27/2011 1:46 AM

There are child therapies for treatment of different child problems that are generally faced by children at their different ages. For best child therapy Christian heart counseling is the best place. For appointments and other details click http://christianheartcounseling.com/
Gravatar # re: LINQ vs Methodized Syntax
by Term life insurance at 1/5/2012 5:20 AM

I'm glad that I had the fortune to stumble across your blog. Its definitely an important issue that not enough people are talking about and I'm glad that I got the chance to see all the angles.
Gravatar # re: LINQ vs Methodized Syntax
by 2013 calendar at 1/7/2012 4:29 AM

2013 calendar
nice
Gravatar # re: LINQ vs Methodized Syntax
by 2012 calendar printable at 1/7/2012 4:33 AM

2012 calendar printable
nice
Gravatar # re: LINQ vs Methodized Syntax
by one time credit score at 1/7/2012 4:37 AM

one time credit score
nice
Gravatar # re: LINQ vs Methodized Syntax
by search engine optimization at 1/28/2012 6:26 AM

The optimal combination of price and quality from the marriage ceremony gown is assured!We provide a broad array of wedding ceremony dresses in USA well-known global brands.
Gravatar # re: LINQ vs Methodized Syntax
by sunshine at 1/31/2012 11:06 AM

chichen itza The seven World Wonders list of the ancient times was initially recorded approximately in the 2nd century BC. 

Your comment:

Title:
Name:
Email:
Website:
 
Italic Underline Blockquote Hyperlink
 
 
Please add 3 and 5 and type the answer here: