Click here to Skip to main content
15,867,780 members
Articles / Web Development / ASP.NET
Article

LINQ to SQL

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
11 Oct 2013CPOL2 min read 10.3K   4  
Start with listening to Anders talk about LINQ in Anders Hejlsberg on LINQ and Functional Programming this video and reading the MSDN Introduction to

This articles was originally at wiki.asp.net but has now been given a new home on CodeProject. Editing rights for this article has been set at Bronze or above, so please go in and edit and update this article to keep it fresh and relevant.

Start with listening to Anders talk about LINQ in Anders Hejlsberg on LINQ and Functional Programming this video and reading the MSDN Introduction to LINQ. If that's too long, perhaps the 5 Minute Intro is more your speed. There's also a good Channel 9 VIdeo with Young Joo talking about the O/R Designer Surface that you'll use a lot if you're using LINQ to SQL.

Sahil Malik has some great posts that go into more detail about LINQ to SQL (aka DLINQ) and how it works.  They are a little older, but still excellent:

Bill Wagner has several posts that go into more detail about how LINQ queries are translated and executed as SQL.  You can read his posts here:

You should also take a look and a number of Scott's Posts on the Subject, including his LINQ Category.

Last, but not least, is the ridiculous number of samples up on MSDN for those who like working in VB, and a version for those who prefer C#.

An important concept to understand with LINQ, particularly LINQ to SQL, is Deferred Execution. Charlie Calvert has a post that covers this in an easily understandable way (with an accompanying video) .

There's a complete LINQ to SQL chapter online from the Wrox book Professional C# 4 and .NET 4.

TOOLS 

  • LINQPad
    You might also like to take a look at the free LINQPad, which contains a huge number of LINQ examples, and allows you to play with and learn LINQ without having to fire up Visual Studio. It's kind of like Management Studio for LINQ, but it's useful for simply LINQ queries as well as LINQ to SQL.
  • LINQ Debugger Visualizer
    For a very uesful tool inside of Visual Studio, check out the LINQ to SQL Debug Visualizer, which lets you debug the generated SQL on the fly that your LINQ queries generate.

In evaluating whether LINQ to SQL might be worthwhile for your company, Hilton Giesenow discusses various performance aspects in using LINQ to SQL. 

Enjoy!

This article was originally posted at http://wiki.asp.net/page.aspx/86/linq-to-sql

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
The ASP.NET Wiki was started by Scott Hanselman in February of 2008. The idea is that folks spend a lot of time trolling the blogs, googlinglive-searching for answers to common "How To" questions. There's piles of fantastic community-created and MSFT-created content out there, but if it's not found by a search engine and the right combination of keywords, it's often lost.

The ASP.NET Wiki articles moved to CodeProject in October 2013 and will live on, loved, protected and updated by the community.
This is a Collaborative Group

755 members

Comments and Discussions

 
-- There are no messages in this forum --