<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Espacio de Dario Quintana &#187; LINQ</title>
	<atom:link href="http://blog.darioquintana.com.ar/category/net/linq/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.darioquintana.com.ar</link>
	<description></description>
	<lastBuildDate>Tue, 21 Jun 2011 22:51:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>What ???!!!</title>
		<link>http://blog.darioquintana.com.ar/2005/11/19/what/</link>
		<comments>http://blog.darioquintana.com.ar/2005/11/19/what/#comments</comments>
		<pubDate>Sat, 19 Nov 2005 02:22:00 +0000</pubDate>
		<dc:creator>Dario Quintana</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://blog.darioquintana.com.ar/?p=21</guid>
		<description><![CDATA[<p>Vean lo que es este trozo de codigo, y me parece que habla por si solo. Si&#8230; es lo que Uds piensan&#8230;es LINQ, Language INtegrated Query.. que te permite hacer consultas en pleno<br /> C# y VB, y no solamente a bases de datos, podes hacerlo como muestra el primer ejemplo, a un simple arreglo.</p> [...]]]></description>
			<content:encoded><![CDATA[<p>Vean lo que es este trozo de codigo, y me parece que habla por si solo. Si&#8230; es lo que Uds piensan&#8230;es LINQ, Language INtegrated Query.. que te permite hacer consultas en pleno<br />
C# y VB, y no solamente a bases de datos, podes hacerlo como muestra el primer ejemplo, a un simple arreglo.</p>
<pre>

using System;

using System.Query;

using Danielfe;


class Program

{

    static void Main(string[] args)

    {

        string[] aBunchOfWords = {"One","Two", "Hello", 

  "World", "Four", "Five"};


        var result =    

            from s in aBunchOfWords // query the string array 

            where s.Length == 5     // for all words with length = 5

            select s;               // and return the string


        //PrintToConsole is an Extension method that prints the value

        result.Print();

    }

 }
</pre>
<p>y para que lo vean como funcionaría con un SQL Server, va un ejemplo, y me parece que no hace falta explicarlo</p>
<pre>
<blockquote></blockquote>

using System;

using System.Query;

using Danielfe;

using System.Data.DLinq; //DLinq is LINQ for Databases

using nwind; //Custom namespace that is tool generated 


class Program

{

    static void Main(string[] args)

    {

        Northwind db = new Northwind("Data Source=(local);Initial Catalog=Northwind;Integrated Security=True");   

        TableCustomers&gt; allCustomers = db.GetTableCustomers&gt;();


        var result = 

                from c in allCustomers

                where c.ContactTitle.Length == 5

                select c.ContactName;


        result.Print();   

    }

 }
</pre>
<p><a href="http://msdn.microsoft.com/netframework/future/linq/">Proyecto LINQ</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.darioquintana.com.ar/2005/11/19/what/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

