Home > Microsoft .Net Development Tips > .NET Developer > Beginning LINQ development, Part 1
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

.NET DEVELOPER

Beginning LINQ development, Part 1


Brian Eastwood, Site Editor
02.01.2007
Rating: --- (out of 5)


.NET Essentials Channel
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


The Language Integrated Query, or LINQ, is one of the most important of the new features afoot in VB 9.0 and C# 3.0.Developers can use LINQ to query to data sources like ADO.NET, SQL and XML. The idea, of course, is that data queries are now an integrated part of Visual Basic and C# and an immeasurable improvement over data integration in the days of preprocessors.

LINQ first emerged at PDC 2005, and though it is intended for the next version of Visual Studio, code-named "Orcas," LINQ is available for use with Visual Studio 2005.

A good starting point for learning more about LINQ is Hooked on LINQ, a wiki for anyone interested in dipping his toe in the water. Among the site's resources are "five-minute overviews" of using LINQ with objects, SQL and XML.

For more on LINQ-to-SQL queries, which were previously called DLINQ queries, check out the Scott Guthrie post Understanding LINQ to SQL Query Translations. (Guthrie is the head of ASP.NET development at Microsoft.) Here you can find hints for working with stored procedures, Where clauses and mathematics functions.
More on LINQ
Commentary: Let's think about LINQ

News: Visual Basic's future: LINQ, Orcas and, yes, VB 6

News: Lhotka on LINQ at VSLive!

For information on an improvement to LINQ-to-XML queries, also known as XLINQ, Fabrice Marguerie has put together a post called LINQ to XSD -- Typed XML programming with LINQ. XSD in this case refers to an XML schema, which is needed to generate the object models that, in turn, manipulate XML data through LINQ. Using the XML Schema gives developers three benefits, Marguerie said -- better readability, type-checking at compile time and IntelliSense support.

Web developers will be happy to learn that LINQ works quite well with ASP.NET applications. Both the Web Site Project, available out of the box in Visual Studio 2005, and the Web Application Project, included in VS 2005 Service Pack 1, support LINQ development. Guthrie has devoted a few blog posts to the topic; sample code is in C#, but he points out that LINQ works equally well in VB.

  • In Using LINQ with ASP.NET (Part 1), he builds an app that binds a collection of objects to a DataGrid and makes uses of Anonymous types and .NET Standard Query Operators. "What is really powerful is that the .NET Standard Query Operators are not a hard-coded list, and can be added to and replaced by any developer. This enables very powerful domain specific implementations," Guthrie writes (emphasis original).
  • In Using DLINQ with ASP.NET (Part 2 of my LINQ series), Guthrie dives into database programming with DLINQ and ASP.NET. Here again the Anonymous type is a star, as it allows developers to pull only the desired column values from a database, as opposed to returning fully populated entity objects. In addition, Guthrie points out, LINQ queries can return sub-collections of objects.
  • In Building and using a LINQ for SQL Class Library with ASP.NET 2.0, Guthrie creates a Web site that references a LINQ-enabled class library. He also looks into object-relational mapping and how LINQ's debugging visualizer can display what database code is "running under the covers."

Finally, if you want to dive into C# and LINQ, then Charlie Calvert has a series of posts for you. Calvert, a community program manager for Visual C#, has written a six-part series called The LINQ Farm, which takes a look at query expressions, query operators, grouping and other LINQ concepts.

Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
.NET Developer
ASP.NET Ajax components: Vendor roundtable -- Part 3
Best practices of the AJAX kind
Printing in Windows Presentation Foundation
Visual Studio 2008 and .NET Framework 3.5 SP1 introduces ADO .NET Entity Designer
Check the MSDN Virtual Labs for regular, compelling new content
Book Excerpt: Sams Teach Yourself Visual Basic 2008 in 24 Hours -- Complete Starter Kit
ASP.NET Ajax components: Vendor roundtable -- Part 2
Check out CodePlex for a ton of interesting .NET projects
ASP.NET Ajax components: Vendor roundtable -- Part 1
Nick Allen's tips for developing SOA for .NET

Visual Studio 2008 and Language Integrated Query (LINQ)
LINQ Learning Guide: Third-party LINQ Implementations
LINQ Learning Guide: LINQ to Entities
LINQ Learning Guide: LINQ to SQL
LINQ Learning Guide: LINQ to DataSet
LINQ Learning Guide: LINQ to Objects
LINQ Learning Guide: LINQ Providers
LINQ Learning Guide
LINQ Learning Guide: LINQ and Visual Studio 2008's new language features
LINQ Learning Guide: LINQ and Web applications
LINQ Learning Guide: LINQ to XML

.NET Framework 3.5 and Visual Studio 2008 development
Printing in Windows Presentation Foundation
Book excerpt: Murach's VB 2008
Mainsoft introduces .NET-to-Java translation tool
A view on VS 2008: On-line agency sees reasons to upgrade
LINQ Learning Guide: LINQ and Visual Studio 2008's new language features
Customizing Visual Studio 2008 using VS Shell
Shell Objects adds Visual Studio 2008, x64 support
How to uninstall pre-release versions of Visual Studio 2008
.NET Framework Library source code released
.NET Framework goes multicore

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
LINQ  (SearchWinDevelopment.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts