views:

312

answers:

5

I didn't see any questions that asked this previously so here goes:

Once you made (or had) the decision to start using LINQ to SQL how long did it take you to learn it's ins and outs?

We're looking at using it at my organization but my superiors are concerned with the initial time cost (learning it). Hours would be the most useful of answers but any insight would be appreciated.

Bonus question: how much time has LINQ saved you since you started using it?

A: 

I don't have any specific metric, but I can say for sure that on the first project I used it, it saved me on the first 2 week sprint more than I spent learning.

Ps. you will find a gotcha as with any approach you use, just stay away of tables with no keys :)

eglasius
A: 

It only took me about 8-10 days to complete a production website for a client using LINQ, never having used it before. I'd guess no more than 50% of that time was spent learning linq.

Now I don't feel that it qualifies me as an expert by any means, but getting productive was very quick and painless.

Having learned it however, I'll be less likely to choose it again for future projects - preferring instead to stick with my own CRUD classes, stored procedures and the SQLDataReader method of accessing data.

EJB
Hi E.J.,I'd love it if you could you go into more detail about why you do not prefer LINQ to SQL. Thanks for your input as well.
I was already comfortable with my own custom stuff; but wondered I was missing out on something not using LINQ...I wasn't. Didn't save me anytime, and performance was not as good; sqldatareader is the fastest method to use anyway so I stick with what I know this time around, but its good to try it.
EJB
(continued) I also do all my data access thru SP's to SQL server and even though linq can do this, it becomes an unnecessary layer of complexity in that scenario.
EJB
+3  A: 

You can learn LINQ to SQL in the subway coming back from work :). Seriously, it really doesn't take any time learning it (1-2 days max), and it's gonna save you a lot of your time!

Amokrane
You can learn the basics in a good 4 hours. Advanced stuff is depended on your Googlefu but I wouldn't put it past some good keywords.
achinda99
This was the feeling I was getting. I probably should have asked how you learned it as well.Thanks Amokrane.
@benrjohnson: I learned it through a webcast from the Microsoft Techdays (but it's in french :/) + an other article written in french as well from http://www.developpez.com/, so I don't think it's gonna be helpful for you :). But any good tutorial on the internet could help!
Amokrane
A: 

I've messed around with it for probably a couple weeks altogether, and I'm not comfortable enough with it to say I've "learned" it. I'm unpursuaded that it provides a benefit for me, but I know SQL pretty well, and that took a long time. I think in the long run SQL solutions will provide better solutions more quickly, but LINQ may save you some of the time investment.

It has yet to save me any time, but then I don't have much trouble coming up with a quick SQL solution.

le dorfier
A: 

It takes no time at all to learn the basics of LINQ to SQL, now learning to deal with the shortcomings of the DBML designer and some of the quirks with LINQ to SQL itself is pretty much an ongoing process. I would say that the benefits greatly outweigh it's deficiencies.

As far as the time it has saved is concerned, like any ORM it saves a fair amount of time, I can't say exactly how much but a considerable amount compared to say having to design your models and objects with IBatis.
You may want to consider the Entity Framework as well.

Quintin Robinson