Hooked on LINQ

Hooked on LINQ - Developers' Wiki
for .NET Language Integrated Query

Companion book for this site
LINQ to Objects Using C# 4.0:
Using and Extending LINQ to Objects and Parallel LINQ (PLINQ)
Quick Search

Advanced Search »

Main Page

Modified: 2010/07/06 22:19 by t_magennis - Categorized as: General
Welcome to Hooked on LINQ. This website aims to be the premier community resource for LINQ (Language Integrated Query) for Microsoft®'s .NET. You can read more about this site here. I hope you find this site useful and bookmark it as your landing place for LINQ related information. If you have ideas or feedback about making this site better, then please add them to this page, or Email me.

Edit

My LINQ to Objects Book - Now Available

LINQ to Objects Using C# 4.0: Using and Extending LINQ to Objects and Parallel LINQ (PLINQ)
This is my book, and much of the material initially came from this website. You can read it now if you are a Safari subscriber, or order it from major bookstores from the links below.

Read it online now on Safari
Order on the Informit website
Edit

LINQ Coffee Mug


Keep a listing of the Standard Query Operators and the C# Query Expression Syntax on your desk!


Edit

Common Topic Entry Points

What is LINQ?Language Enhancements
What is LINQ?C# 3.0 - New Language Features Enabling LINQ
LINQ to Objects - 5 minute overview VB 9 - New Language Features Enabling LINQ
LINQ to SQL - 5 minute overview
LINQ to XML- 5 minute overview
Writing LINQ Queries
List of LINQ Specific Books Updated

LINQ to ObjectsLINQ to SQL
LINQ to Objects Main Entry Page
LINQ to SQL Main Entry Page
LINQ to Objects - 5 minute overview Hot TopicLINQ to SQL - 5 minute overview Hot Topic
LINQ to Objects Frequently Asked Questions (and answers!)
LINQ to SQL Frequently Asked Questions (and answers!)
LINQ to Objects Standard Query Operator Reference (50+ pages) Hot Topic
Writing your own operators (with samples)

LINQ to XML
LINQ to * (other LINQ enabled data sources)
LINQ to XML Main Entry Page
LINQ to Other Index Page
LINQ to XML - 5 minute overview Hot TopicLINQ to Datasets (Microsoft)
LINQ to XML Frequently Asked Questions (and answers!)
LINQ to Entities (Microsoft)

Continuous LINQ (Non-Microsoft) (self-updating result sets)

LINQ to Signum
Top

Edit

What is LINQ?

It is a set of language changes and API's that allow you to write SQL-like queries natively in your chosen .NET programming language.


Sample LINQ to Objects Code over in memory collection:

var q = from call in callLog where call.Incoming == true group call by call.Number into g join contact in contacts on g.Key equals contact.Phone orderby contact.FirstName, contact.LastName select new { contact.FirstName, contact.LastName, Count = g.Count(), Avg = g.Average( c => c.Duration ), Total = g.Sum( c => c.Duration )};
Ariel Hazelgrove - Calls:2, Time:27mins, Avg:13.5mins Armando Valdes - Calls:2, Time:20mins, Avg:10mins Barney Gottshall - Calls:4, Time:31mins, Avg:7.75mins Chance Lard - Calls:2, Time:22mins, Avg:11mins Mack Kamph - Calls:2, Time:44mins, Avg:22mins Stewart Kagel - Calls:2, Time:13mins, Avg:6.5mins
Sample LINQ to XML Code - Generate XML from any datasource:

XElement xml = new XElement("Contacts", from contact in contacts orderby contact.LastName, contact.FirstName ascending select new XElement("contact", new XAttribute("email", contact.Email), new XElement("FirstName", contact.FirstName), new XElement("LastName", contact.LastName)));
Jeffery Deane Adam Gauwain
Top

Edit

How to use this site

This website is based on the Wiki concept, originally invented by Ward Cunningham, but introduced to the masses by Wikipedia. It allows you to author and edit pages using a simple character markup language, rather than having to master HTML. Its other major pillar is that by allowing public editing of pages, the community at large correct errors, reaches concensus and brings the most up-to-date information on a subject to the forefront. It is my hope that we together achieve this goal on Hooked on LINQ.

For formatting help, visit the Page Editing Section or at the ScrewTurn website.

To get a feel for the formatting syntax, play in the Sandbox where it is impossible for you to cause any damage. Once you get used the syntax and have browsed the site to get a feeling for how the content on this site is organised, feel free to jump right in and add/modify or comment on the content.

Top

If you would like to comment on this page, click on the Discuss button located on the top-right of each page. Feel free to edit any mistakes or omissions you find. If you have an objection or find in-appropriate content then contact the administrator. This website is not affiliated with Microsoft®, all content and opinions are those of the specific author and some advice, solutions and article may contain unintentional errors - please use care. Other websites by this author: Focused Objective, Geek Speak Decoded.