views:

404

answers:

10

I have set myself upon a journey to educate my coworkers (all have accepted my mission, even the boss). Every day I seem to find a piece of code that could have been less error prone if my coworkers knew more about the framework, better-know-framework (in courtesy of DNR ;)) is part two of my teaching process. First part is teaching my coworkers about LINQ, what it can do for them and how it is written.

My big question is where are all the good basic resources for LINQ education, everything if find is tightly coupled to Linq2Sql or all other sorts of material. Neither have I been able to find a tutorial for the actual linq syntax (except a specification of it all).

(I hope this haven't been asked before but if it has please say so, cause then my searching skills have failed ;) )

Basic tutorials (free):

Basic tutorials (commercial sites):

Reference sites:

+1  A: 

There's a nice one on MSDN.

Darin Dimitrov
*banging head against the table* How did I miss that one?
cyberzed
+8  A: 

I find this helpful:

101 LINQ Samples

and a good post on joins.

RedFilter
An excellent resource. Another "101 LINQ Samples" exists - for VB.NET. +1.
M.A. Hanin
I find 101 great for samples but I kindda miss the basic "this is LINQ, this is how it's meant to be read"
cyberzed
+6  A: 

My suggestion would be to simply have your co-workers download LINQPad.

The software has some tutorials that should cover the basics and it will give them an environment where they can see results almost immediately.

Justin Niessner
Just downloading LINQPad won't do the job...I need input for me holding a session for them. Besides that they would never use LINQPad since we never connect directly to MSSql or so. (everything goes through ESRI's ArcSDE )
cyberzed
@cyberzed Have them download LINQPad for a training session. Train them using the tutorials (you can either have them connect to a dummy AdventureWorks database or create some boilerplate scripts and use LINQ to Objects). Beyond the training, they won't need LINQPad.
Justin Niessner
Hmmm, I would prefer teaching them with stuff that relates to what we do. I always found sessions to be semi-disturbing if you have no clue about the data. For some reason none of my coworkers or I have been shuffling about AdventureWorks db.
cyberzed
+3  A: 

two that I use are

Hooked on Linq

and

MSDN 101 samples

Pharabus
The MSDN 101 samples are handy! (Even if MSDN still has them under "Future Versions" of C#.)
Curt Nichols
+1  A: 

If it doesn't have to be free, the Mastering LINQ Series on Tekpub is great. The guy shows a concept (like a foreach loop to filter data) using "normal" C# code and then using LINQ.

No L2S at all, but all the underlying concepts.

Michael Stum
Agree with this one, the TekPub series is good. The tutor (for want of a better word) Justin Etheridge has an excellent blog... see my answer for that one:)
Steve Haigh
A: 

Is anyone on your team familiar with SQL? I don't mean to fucus on Linq2SQL but I have found that people with familiarity with the declarative-nature of SQL (express WHAT you want, not HOW) seem to grasp LINQ more quickly. They might be able to help you reach the rest.

n8wrl
Everyone on the team knows SQL, so the trick is making sure they understand the syntax since it's a slight variant :)
cyberzed
The slight variation throws me sometimes too - but the familiarity with 'what not how' is a big win in learning linq.
n8wrl
+2  A: 

Buy the office a copy 100 copies of Jon Skeet's C# In Depth. It not only covers LINQ syntax and lambda expressions, it is also a good primer for getting people up-to-speed on changes to the language since C# 1.

http://csharpindepth.com

Anthony Pegram
I liked this book because it builds up all the new features in C# 3, all of which exist basically to support LINQ.
Matt Greer
Might I suggest buying the office *several* copies instead of just one? It never hurts to have an emergency backup copy ;)
Jon Skeet
Quite right. Buy a dozen cases of C# In Depth and store some offsite in an environmentally-controlled storage facility because you never know when disaster might strike. Better safe than sorry.
Anthony Pegram
Hmm I would say 3 pr. developer...one at the office, one at home and one in the bag with the laptop :D And if you could make the next revision have a GPS module so we can keep track of 'em with our software then it would be lovely :)P.S. I'll have a look at it this weekend and probably poke the boss about at least 1 copy next week (hmm, I'll have to do something good now that I just doubted the words of Mr. Skeet (I'll buy you a beer next time in the UK))
cyberzed
+1  A: 

Another answer already mentioned Justin Etheridge's series on TekPub, which is good. Justin also wrote a good blog post comparing LINQ to loops which is worth a look: http://www.codethinked.com/post/2009/06/15/Life-After-Loops.aspx#continue

Steve Haigh
A: 

The way I learned a LOT about it is with ReSharper. ReSharper 5's functionality in this is quite an improvement over the 4, in fact...suggesting and converting loops into LINQ method chains with ease.

Of course, you want them to learn as well, so it's important to have em WRITE it as well as having tools like that help out.

Gus
On top of that we would have to invest money in ReSharper as well...plus convincing 66% of the developer team that an addon would help them (I'm currently using CodeRush but some of the other devs are of the opinion that it's not needed at all).
cyberzed