15

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:

cyberzed
  • 1,926
  • 1
  • 15
  • 26

10 Answers10

8

I find this helpful:

101 LINQ Samples

and a good post on joins.

D'Arcy Rittich
  • 153,827
  • 35
  • 271
  • 277
6

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.

cyberzed
  • 1,926
  • 1
  • 15
  • 26
Justin Niessner
  • 229,755
  • 35
  • 391
  • 521
  • 1
    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 Apr 28 '10 at 14:42
  • @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 Apr 28 '10 at 14:54
  • 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 Apr 28 '10 at 14:58
4

two that I use are

Hooked on Linq

and

MSDN 101 samples

Pharabus
  • 6,003
  • 1
  • 24
  • 39
2

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
  • 114,815
  • 25
  • 210
  • 245
  • 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 Apr 28 '10 at 14:49
  • 1
    Might I suggest buying the office *several* copies instead of just one? It never hurts to have an emergency backup copy ;) – Jon Skeet Apr 28 '10 at 20:07
  • 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 Apr 28 '10 at 20:13
  • 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 Apr 29 '10 at 09:09
1

There's a nice one on MSDN.

Darin Dimitrov
  • 960,118
  • 257
  • 3,196
  • 2,876
1

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
  • 167,397
  • 108
  • 388
  • 523
  • 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 Apr 28 '10 at 14:46
1

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
  • 8,301
  • 1
  • 24
  • 37
0

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
  • 18,771
  • 4
  • 58
  • 100
  • Everyone on the team knows SQL, so the trick is making sure they understand the syntax since it's a slight variant :) – cyberzed Apr 28 '10 at 14:49
  • The slight variation throws me sometimes too - but the familiarity with 'what not how' is a big win in learning linq. – n8wrl Apr 28 '10 at 16:26
0

Introducing LINQ - Part I
Wikipedia
0

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.

Pete H.
  • 1,427
  • 1
  • 12
  • 16
  • 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 Apr 29 '10 at 10:35