Friday, June 29, 2007

Crash Course for Using LINQ

Kevin Goff [MVP] wrote a very good article for beginners in LINQ. If you have not seen LINQ examples yet, or are unclear in what it is and how does it work, Kevin makes it very easy to understand with good examples. Basing on Beta 1 of "Orcas" (the next release of MS Visual Studio), LINQ (Language Integrated Query) comes in four major flavors:

Querying Microsoft SQL Server data using a strongly-typed DataContext (LINQ to SQL)
Querying in-memory .NET objects (LINQ to Objects)
Querying .NET DataSets (LINQ to DataSets)
Querying XML Data (LINQ to XML)
LINQ puts the power of "objectifying" database access at your fingertips. Sure, you say, but in my organization I do not have access to data-queries as we are required to go through DBA-provided stored procedures only. No problem. You can still use LINQ to DataSets and manipulate the retrieved datasets in your code with ease. This will be very familiar already to developers with experience in Visual FoxPro (I wonder why?).

Kevin gives working, easy to follow examples of all four cases.

The article appears in the July/August 2007 issue of Code Magazine and it's available online for subscribers at the link provided above.

Highly recommended article in an excellent magazine to which I subscribe to and urge you to look at if you haven't already done so; (no I do not work for CoDe but I do think they are worth subscribing to).

1 comment:

  1. Anonymous1:41 AM EDT

    Hi, Alex,

    Thanks very much for the feedback! I appreciate it.

    Kevin

    ReplyDelete