LINQ - Sample Queries

This project contains about 101 samples using LINQ.

4.8 Star
179,659 times
Add to favorites
E-mail Twitter Digg Facebook

Solution explorer

<!-- This file is excerpted from "XML Query Use Cases" (
Copyright (c) 2007 W3C (R) (MIT, ERCIM, Keio).  All Rights Reserved.  W3C liability, trademark and document use rules apply. 
The Status section of "XML Query Use Cases" states as follows:
Status of this Document
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at
This is the W3C Working Group Note of "XML Query (XQuery) Use Cases", produced by the W3C XML Query Working Group, part of the XML Activity. This document is being published as a Working Group Note to persistently record the Use Cases that guided the development of XQuery 1.0: An XML Query Language and its associated specifications as W3C Recommendations.
Please submit comments about this document using W3C's public Bugzilla system (instructions can be found at If access to that system is not feasible, you may send your comments to the W3C XSLT/XPath/XQuery public comments mailing list, It will be very helpful if you include the string [XQRecUseCases] in the subject line of your report, whether made in Bugzilla or in email. Each Bugzilla entry and email message should contain only one comment. Archives of the comments and responses are available at
Publication as a Working Group Note does not imply endorsement by the W3C Membership. At the time of publication, work on this document was considered complete and no further revisions are anticipated. It is a stable document and may be used as reference material or cited from another document. However, this document may be updated, replaced, or made obsolete by other documents at any time.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy .
<!DOCTYPE report SYSTEM "report.dtd">
<title>Getting started with SGML</title>
<title>The business challenge</title>
<para>With the ever-changing and growing global market, companies and
large organizations are searching for ways to become more viable and
competitive. Downsizing and other cost-cutting measures demand more
efficient use of corporate resources. One very important resource is
an organization's information.</para>
<para>As part of the move toward integrated information management,
whole industries are developing and implementing standards for
exchanging technical information. This report describes how one such
standard, the Standard Generalized Markup Language (SGML), works as
part of an overall information management strategy.</para>
<graphic graphname="infoflow"/></intro></chapter>
<title>Getting to know SGML</title>
<para>While SGML is a fairly recent technology, the use of
<emph>markup</emph> in computer-generated documents has existed for a
<section shorttitle="What is markup?">
<title>What is markup, or everything you always wanted to know about
document preparation but were afraid to ask?</title>
<para>Markup is everything in a document that is not content. The
traditional meaning of markup is the manual <emph>marking</emph> up
of typewritten text to give instructions for a typesetter or
compositor about how to fit the text on a page and what typefaces to
use. This kind of markup is known as <emph>procedural markup</emph>.</para></intro>
<topic topicid="top1">
<title>Procedural markup</title>
<para>Most electronic publishing systems today use some form of
procedural markup. Procedural markup codes are good for one
presentation of the information.</para></topic>
<topic topicid="top2">
<title>Generic markup</title>
<para>Generic markup (also known as descriptive markup) describes the
<emph>purpose</emph> of the text in a document. A basic concept of
generic markup is that the content of a document must be separate from
the style. Generic markup allows for multiple presentations of the
<topic topicid="top3">
<title>Drawbacks of procedural markup</title>
<para>Industries involved in technical documentation increasingly
prefer generic over procedural markup schemes. When a company changes
software or hardware systems, enormous data translation tasks arise,
often resulting in errors.</para></topic></section>
<section shorttitle="What is SGML?">
<title>What <emph>is</emph> SGML in the grand scheme of the universe, anyway?</title>
<para>SGML defines a strict markup scheme with a syntax for defining
document data elements and an overall framework for marking up
<para>SGML can describe and create documents that are not dependent on
any hardware, software, formatter, or operating system. Since SGML documents
conform to an international standard, they are portable.</para></intro></section>
<section shorttitle="How does SGML work?">
<title>How is SGML and would you recommend it to your grandmother?</title>
<para>You can break a typical document into three layers: structure,
content, and style. SGML works by separating these three aspects and
deals mainly with the relationship between structure and content.</para></intro>
<topic topicid="top4">
<para>At the heart of an SGML application is a file called the DTD, or
Document Type Definition. The DTD sets up the structure of a document,
much like a database schema describes the types of information it
<para>A database schema also defines the relationships between the
various types of data. Similarly, a DTD specifies <emph>rules</emph>
to help ensure documents have a consistent, logical structure.</para></topic>
<topic topicid="top5">
<para>Content is the information itself. The method for identifying
the information and its meaning within this framework is called
<emph>tagging</emph>. Tagging must
conform to the rules established in the DTD (see <xref xrefid="top4"/>).</para>
<graphic graphname="tagexamp"/></topic>
<topic topicid="top6">
<para>SGML does not standardize style or other processing methods for
information stored in SGML.</para></topic></section></chapter>
<title>Conferences, tutorials, and training</title>
<para>The Graphic Communications Association has been
instrumental in the development of SGML. GCA provides conferences,
tutorials, newsletters, and publication sales for both members and