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: -1.50- (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.

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 dev...


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



RELATED CONTENT
.NET Developer
How to speed up Visual Studio 2008's slow WPF designer
How to list fonts in WPF using markup extensions and data templates
How to convince management to buy Microsoft Visual Studio 2008
Microsoft webcast series previews new Visual Studio 2010 features
New features in Windows 7 bring new UI considerations for developers
User Account Control (UAC): How to develop code for standard users
Introduction to Vista's user account control (UAC) for developers
Visual Studio 2008 code metrics tools will help keep code clean
Downloadable MSDN library released for VS 2008 SP 1
Widgetbox provides good example of how to use Facebook Developer Toolkit

Visual Studio 2008 and Language Integrated Query (LINQ)
Run Visual Studio Web Tests from a Team Foundation Server Build
LINQ in Visual Studio 2008 addresses object data modeling
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

.NET Framework 3.5 and Visual Studio 2008 development
Microsoft's message at TechEd: make the most of what you have
How to speed up Visual Studio 2008's slow WPF designer
How to list fonts in WPF using markup extensions and data templates
How to convince management to buy Microsoft Visual Studio 2008
Moonlight 1.0 release brings Silverlight to Linux
Microsoft cuts Visual Studio 2008 upgrade prices as VS 2010 looms
User Account Control (UAC): How to develop code for standard users
How to write installers in Vista that work correctly under UAC
How to elevate programs' privileges correctly using Vista's UAC
Introduction to Vista's user account control (UAC) for developers

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


elopers 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.




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.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




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