<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://introducinglinq.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Microsoft LINQ Books</title><link>http://introducinglinq.com/blogs/default.aspx</link><description>Programming Microsoft LINQ &amp;amp; Introducing Microsoft LINQ</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.2)</generator><item><title>IQueryable under the cover</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/08/17/iqueryable-under-the-cover.aspx</link><pubDate>Sun, 17 Aug 2008 09:07:48 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:155</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;In the &lt;a href="http://www.amazon.com/gp/product/0735624003/?tag=se04-20"&gt;Programming Microsoft LINQ&lt;/a&gt; book we dedicated two whole chapters (76 pages) about the writing of a IQueryable LINQ provider: one is about expression trees and the other covers the several ways to extend LINQ, including the writing of an IQueryable provider. I know that the subject is complex and probably is not necessary to every programmer. However, a good understanding of what happens under the cover of an IQueryable provider is good for everyone using any flavor of LINQ: when you debug your code, it might help you in finding issues faster.&lt;/p&gt; &lt;p&gt;I wrote this introduction just to explain why you should read &lt;a href="http://community.bartdesmet.net/blogs/bart/archive/2008/08/15/the-most-funny-interface-of-the-year-iqueryable-lt-t-gt.aspx"&gt;this post&lt;/a&gt; of &lt;a href="http://community.bartdesmet.net/blogs/bart/about.aspx"&gt;Bart De Smet&lt;/a&gt;, which is undoubtedly shorter than the corresponding chapter of our book and gives you a very good step-by-step introduction of the inner workings of an IQueryable LINQ provider. Then, if you really like this kind of things, you have another good reason to read &lt;a href="http://programminglinq.com/"&gt;the book&lt;/a&gt; :-)&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=155" width="1" height="1"&gt;</description></item><item><title>Important LINQ Changes in .NET 3.5 SP1</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/08/12/important-linq-changes-in-net-3-5-sp1.aspx</link><pubDate>Tue, 12 Aug 2008 07:55:25 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:154</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Dinesh Kulkarni wrote an &lt;a href="http://blogs.msdn.com/dinesh.kulkarni/archive/2008/08/10/net-fx-3-5-sp1-two-perf-improvements-linq-to-objects-and-linq-to-sql.aspx"&gt;important post about changes&lt;/a&gt; in LINQ introduced by &lt;a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx"&gt;.NET 3.5 SP1&lt;/a&gt; that has been released yesterday.&lt;/p&gt; &lt;p&gt;One of the interesting changes is in the Cast&amp;lt;T&amp;gt; operator and its behavior is better described in &lt;a href="http://blogs.msdn.com/ed_maurer/archive/2008/02/16/breaking-change-in-linq-queries-using-explicitly-typed-range-variables.aspx"&gt;this post&lt;/a&gt; by Ed Maurer. I think that the side effects of this change should be limited, because the use of explicit type for the range variable in a query expression (i.e. &lt;font color="#0000ff"&gt;from &lt;strong&gt;&lt;font color="#008000"&gt;int&lt;/font&gt;&lt;/strong&gt; n in numbers select...&lt;/font&gt; instead of &lt;font color="#0000ff"&gt;from n in numbers select...&lt;/font&gt;) is not very common. In fact, I don't remember examples of its usage in our &lt;a href="http://programminglinq.com/"&gt;Programming LINQ&lt;/a&gt; book. Take care of this change if you used (or will use) this syntax.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=154" width="1" height="1"&gt;</description></item><item><title>Dangerous use of ArrayList in Lambda Expressions</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/08/01/dangerous-use-of-arraylist-in-lambda-expressions.aspx</link><pubDate>Fri, 01 Aug 2008 10:53:07 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:153</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I have just validated &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=359523"&gt;this bug&lt;/a&gt; posted on Connect. It seems a compiler issue, I'd like to read a Microsoft answer about this.&lt;/p&gt; &lt;p&gt;However, the general issue is that using ArrayList in a lambda expression with a collection initializer could be dangerous. There are not so many reasons to use an ArrayList in a lambda expression, unless you are refactoring or working with legacy code that cannot be modified upgrading ArrayList to generic collections.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=153" width="1" height="1"&gt;</description></item><item><title>The adoption of LINQ</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/07/25/the-adoption-of-linq.aspx</link><pubDate>Fri, 25 Jul 2008 07:06:38 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:152</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Eric White has written an interesting post titled &lt;a href="http://blogs.msdn.com/ericwhite/archive/2008/07/24/are-developers-using-linq.aspx"&gt;"Are developers using LINQ?"&lt;/a&gt; - there are interesting considerations about the adoption of functional programming too, but the most interesting part for me is the list of comment of the post. A lot of people described the adoption of LINQ into their team or company, and there is a spread variety of comments (good and bad).&lt;/p&gt; &lt;p&gt;An interesting comment is about the future adoption of F# when it will be shipped, because of the complete adoption of functional programming (C# 3 is not a complete functional programming like F# is). I suggest you to take a look at this post and its comments, because it gives you an idea of what is going on out there.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=152" width="1" height="1"&gt;</description></item><item><title>Multiple Results with LINQ to SQL</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/07/24/multiple-results-with-linq-to-sql.aspx</link><pubDate>Thu, 24 Jul 2008 06:49:59 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:150</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I just read &lt;a href="http://tonesdotnetblog.wordpress.com/2008/07/23/linq-to-sql-batches-and-multiple-results-without-stored-procedures-by-tony-wright/"&gt;a post&lt;/a&gt; about getting multiple results with LINQ to SQL without using stored procedures. This technique is interesting when you have multiple queries returning a few rows each one and you want to save time by skipping some roundtrip between your program and SQL Server. Looking at the post, I immediately thought that it would be interesting comparing this solution with an asynchronous one, executing each query in a different thread. I don't have time to make some benchmark, but it would be interesting to make a comparison between these two techniques.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=150" width="1" height="1"&gt;</description></item><item><title>Use of Distinct and OrderBy in LINQ</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/07/20/use-of-distinct-and-orderby-in-linq.aspx</link><pubDate>Sun, 20 Jul 2008 08:16:26 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:145</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;A few days ago I found a bug in a program written using LINQ to SQL, which was caused by years of use of SQL. The requirement was something like: get the distinct values of (bla bla bla) sorted alphabetically. An example of the required query with Northwind would be the following one:&lt;/p&gt; &lt;p&gt;&lt;pre&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;DISTINCT
&lt;/span&gt;&lt;span style="color:#000000;"&gt;        e&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;LastName
&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;FROM&lt;/span&gt;&lt;span style="color:#000000;"&gt;    Orders o
&lt;/span&gt;&lt;span style="color:#808080;"&gt;LEFT&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;JOIN&lt;/span&gt;&lt;span style="color:#000000;"&gt; [Employees] e
        &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt;&lt;span style="color:#000000;"&gt; e&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[EmployeeID] &lt;/span&gt;&lt;span style="color:#808080;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; o&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[EmployeeID]
&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ORDER&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;BY&lt;/span&gt;&lt;span style="color:#000000;"&gt; e&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;LastName &lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Fundamentally, we are using both a DISTINCT and an ORDER BY statement in SQL.
&lt;p&gt;Now, if you create a NorthwindDataContext importing the Order and Employee tables, you can try to write a similar statement in LINQ to SQL. Unfortunately, the Distinct clause is not part of the query syntax and the most intuitive path could be the one of calling Distinct at the end of your statement, like in the following query:
&lt;p&gt;&lt;pre&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;var&lt;/span&gt;&lt;span style="color:#000000;"&gt; queryA =
    (&lt;/span&gt;&lt;span style="color:#000000;"&gt;from&lt;/span&gt;&lt;span style="color:#000000;"&gt; o &lt;/span&gt;&lt;span style="color:#000000;"&gt;in&lt;/span&gt;&lt;span style="color:#000000;"&gt; db.Orders
     &lt;/span&gt;&lt;span style="color:#000000;"&gt;orderby&lt;/span&gt;&lt;span style="color:#000000;"&gt; o.Employee.LastName
     &lt;/span&gt;&lt;span style="color:#000000;"&gt;select&lt;/span&gt;&lt;span style="color:#000000;"&gt; o.Employee.LastName)
     .Distinct();&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;However, the Distinct clause is removing the sort condition defined by the &lt;em&gt;orderby&lt;/em&gt; keyword. In fact, the SQL statement sent to the database is the following one:
&lt;p&gt;&lt;pre&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;DISTINCT
&lt;/span&gt;&lt;span style="color:#000000;"&gt;        [t1]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[LastName]
&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;FROM&lt;/span&gt;&lt;span style="color:#000000;"&gt;    [dbo]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[Orders] &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="color:#000000;"&gt; [t0]
&lt;/span&gt;&lt;span style="color:#808080;"&gt;LEFT&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;OUTER&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;JOIN&lt;/span&gt;&lt;span style="color:#000000;"&gt; [dbo]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[Employees] &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="color:#000000;"&gt; [t1]
        &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt;&lt;span style="color:#000000;"&gt; [t1]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[EmployeeID] &lt;/span&gt;&lt;span style="color:#808080;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; [t0]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[EmployeeID]&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;This behavior might appear strange. The problem is that the Distinct operator does not grant that it will maintain the original order of values. Applied to LINQ to SQL, this mean that a sort constraint can be ignored in the case of a query like &lt;em&gt;queryA&lt;/em&gt;.
&lt;p&gt;The solution is pretty sample: put the &lt;em&gt;OrderBy &lt;/em&gt;operator &lt;u&gt;after &lt;/u&gt;the &lt;em&gt;Distinct &lt;/em&gt;one, like in the following &lt;em&gt;queryB&lt;/em&gt; definition:
&lt;p&gt;&lt;pre&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;var&lt;/span&gt;&lt;span style="color:#000000;"&gt; queryB = 
    (&lt;/span&gt;&lt;span style="color:#000000;"&gt;from&lt;/span&gt;&lt;span style="color:#000000;"&gt; o &lt;/span&gt;&lt;span style="color:#000000;"&gt;in&lt;/span&gt;&lt;span style="color:#000000;"&gt; db.Orders
     &lt;/span&gt;&lt;span style="color:#000000;"&gt;select&lt;/span&gt;&lt;span style="color:#000000;"&gt; o.Employee.LastName)
    .Distinct().OrderBy( n =&amp;gt; n );
&lt;p&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;/span&gt;This will result in the following SQL statement sent to Northwind:
&lt;p&gt;&lt;pre&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt;&lt;span style="color:#000000;"&gt;  [t2]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[LastName]
&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;FROM&lt;/span&gt;&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#808080;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;DISTINCT
&lt;/span&gt;&lt;span style="color:#000000;"&gt;                    [t1]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[LastName]
          &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;FROM&lt;/span&gt;&lt;span style="color:#000000;"&gt;      [dbo]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[Orders] &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="color:#000000;"&gt; [t0]
          &lt;/span&gt;&lt;span style="color:#808080;"&gt;LEFT&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;OUTER&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;JOIN&lt;/span&gt;&lt;span style="color:#000000;"&gt; [dbo]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[Employees] &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="color:#000000;"&gt; [t1]
                    &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt;&lt;span style="color:#000000;"&gt; [t1]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[EmployeeID] &lt;/span&gt;&lt;span style="color:#808080;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; [t0]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[EmployeeID]
        &lt;/span&gt;&lt;span style="color:#808080;"&gt;)&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="color:#000000;"&gt; [t2]
&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ORDER&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;BY&lt;/span&gt;&lt;span style="color:#000000;"&gt; [t2]&lt;/span&gt;&lt;span style="color:#808080;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;[LastName]&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;If you remove some syntax redundancy, this is exactly the same query I wrote at the beginning of my post.
&lt;p&gt;The lesson is: in a SQL query, the position of an operator is not relevant until operators belong to the same SELECT/FROM statement. In LINQ, this is not true and the conversion to SQL could remove LINQ operators when their operation might be ignored by other operators in the same LINQ query.
&lt;p&gt;Final consideration: initially I considered that the compiler could emit some warning in case a query reduction is done like in the queryA case. Unfortunately, the query reduction operation is done by the LINQ to SQL provider at execution time and not during compilation. A warning could still be possible, but it's something that I would move to tools like FxCop.
&lt;p&gt;&lt;pre&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;/pre&gt;&lt;/p&gt;&lt;/span&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=145" width="1" height="1"&gt;</description></item><item><title>LINQ query optimizations</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/07/19/linq-query-optimizations.aspx</link><pubDate>Fri, 18 Jul 2008 20:28:00 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:144</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>1</slash:comments><description>&lt;P&gt;Look at &lt;A class="" href="http://odetocode.com/Blogs/scott/archive/2008/07/14/12192.aspx"&gt;this excellent blog post&lt;/A&gt; written by &lt;A class="" href="http://odetocode.com/Blogs/scott"&gt;K. Scott Allen&lt;/A&gt;. I completely agree with him: don't try to optimize a LINQ query until you measure its performance and understand it is really a bottleneck that needs to be improved.&lt;/P&gt;
&lt;P&gt;An interesting consideration I never made before is that you can call the OrderBy extension method &lt;EM&gt;after&lt;/EM&gt; the Select and not before. Yes, using the query syntax of C# you are used to put the Select after the OrderBy, but &lt;EM&gt;sometime&lt;/EM&gt; it could be better to invert this order (the reasons are already well explained in the Scott Allen's post).&lt;/P&gt;
&lt;P&gt;And, of course, consider that performance have to be evaluated in two dimension: time &lt;EM&gt;and &lt;/EM&gt;space. And, sooner than later, a third dimension (parallelism) will gain the same importance.&lt;/P&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=144" width="1" height="1"&gt;</description></item><item><title>Implement progress reporting and cancellation of LINQ queries</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/07/18/implement-progress-reporting-and-cancellation-of-linq-queries.aspx</link><pubDate>Fri, 18 Jul 2008 01:06:29 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:141</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Samuel Jack wrote two interesting posts discussing possible extension methods for LINQ. One is to implement &lt;a href="http://blog.functionalfun.net/2008/07/reporting-progress-during-linq-queries.html"&gt;progress reporting&lt;/a&gt; of a LINQ query. The other is to implement a way to &lt;a href="http://blog.functionalfun.net/2008/07/cancelling-long-running-linq-queries.html"&gt;cancel a running LINQ query&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Both implementations are very simple and they are very good to illustrate how LINQ can be extended and manipulated in a simple way by using extension methods.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=141" width="1" height="1"&gt;</description><category domain="http://introducinglinq.com/blogs/marcorusso/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>LINQ to SQL and varchar(1) fields</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/07/17/linq-to-sql-and-varchar-1-fields.aspx</link><pubDate>Thu, 17 Jul 2008 07:03:49 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:143</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;If you are using the Object Relational Designer of LINQ to SQL creating an entity of an existing table that has some VARCHAR(1) fields, you are going into this issue.&lt;/p&gt; &lt;p&gt;The data member created in C# is char instead of string. If the field is always filled with one char, this works. But if you try to read a row from the table containing an empty string (not a NULL field, but a field of zero characters) you will get this exception:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;String must be exactly one character long.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This behavior has been already described in &lt;a href="http://rjdudley.com/blog/LINQErrorStringMustBeExactlyOneCharacterLong.aspx"&gt;this post&lt;/a&gt; and in the &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2291060&amp;amp;SiteID=1"&gt;LINQ forum&lt;/a&gt;. But one more warning could be important: this is a latent error that will express yourself only at runtime if you don't fix. Thus, be careful whenever you have some VARCHAR(1) fields in your tables.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=143" width="1" height="1"&gt;</description></item><item><title>The Amazon Reviews law</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/07/11/the-amazon-reviews-law.aspx</link><pubDate>Fri, 11 Jul 2008 08:48:39 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:139</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;While you have few reviews, a single bad review lower the overall rate. Today we got a bad review, probably because there was a misunderstanding about the scope of the book. I feel the need to give some information to help other possible readers to make a good choice.&lt;/p&gt; &lt;p&gt;First of all, I suggest everyone to take a look at the &lt;a href="http://programminglinq.com/blogs/marcorusso/archive/2008/06/24/sample-chapters-from-programming-linq.aspx"&gt;book contents&lt;/a&gt;. It already describes pretty well what you should expect to find in this large book. In the &lt;a href="http://programminglinq.com/blogs/marcorusso/archive/2008/06/24/sample-chapters-from-programming-linq.aspx"&gt;same place&lt;/a&gt;, you will find the links to download two sample chapters of the book. They are not the toughest ones, but they show you the general approach that is the one of explaining LINQ, addressing its use with other libraries (like ASP.NET, WCF, WPF, WCF and so on). This does not mean that we cover how to make data binding works of how to write an application in WPF. We assume that a particular library for communication or presentation is already in your skills. We only concentrate our attention on data query and manipulation.&lt;/p&gt; &lt;p&gt;Another point is the language. We used C# as a language of choice, and used VB.NET only in chapters where the features and/or syntaxes are significantly different (XML integration is one of the most important area for this). Converting existing C# samples in VB is very simple, and we always highlighted when major differences are expected. There are parts where only the VB syntax is available (see XML) and other parts where C# doesn't have correspondent VB syntax. All these differences are well explained in two appendixes, one for C# and the other for VB. We had to make this decision because space was limited and we had a lot of content to put into the book.&lt;/p&gt; &lt;p&gt;I hope this will help you. Please &lt;a href="http://programminglinq.com/blogs/marcorusso/contact.aspx"&gt;contact me&lt;/a&gt; if you have any doubt and/or would like to give other feedback.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=139" width="1" height="1"&gt;</description></item><item><title>Extending LINQ to XML</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/07/10/extending-linq-to-xml.aspx</link><pubDate>Thu, 10 Jul 2008 08:44:12 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:138</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Eric White &lt;a href="http://blogs.msdn.com/ericwhite/archive/2008/07/09/open-xml-sdk-and-linq-to-xml.aspx"&gt;shows some interesting use of LINQ to XML&lt;/a&gt; to query an Open XML document.&lt;/p&gt; &lt;p&gt;Something that is not immediate to learn when you use LINQ is that you can define your own extension methods to make your queries smarter and more readable. This post is a good exercise to think in a more flexible way: even for me, it's the first time I see an example of "extension" applied to LINQ to XML.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=138" width="1" height="1"&gt;</description></item><item><title>Sample chapters from Programming LINQ</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/06/24/sample-chapters-from-programming-linq.aspx</link><pubDate>Tue, 24 Jun 2008 06:48:43 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:136</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Two sample chapters of my &lt;a href="http://www.amazon.com/gp/product/0735624003/?tag=se04-20"&gt;Programming Microsoft LINQ&lt;/a&gt; book are finally available. Links to download pages in the chapters title.&lt;/p&gt; &lt;p&gt;&lt;a href="http://programminglinq.com/files/folders/programming_microsoft_linq/entry134.aspx"&gt;&lt;strong&gt;Chapter 6 - Tools for LINQ to SQL&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;In this chapter, we took a look at the tools that are available to generate LINQ to SQL entities and DataContext classes. The .NET Framework SDK includes the command-line tool named SQLMetal. Visual Studio 2008 has a graphical editor known as the Object Relational Designer. Both allow the creation of a DBML file, the generation of source code in C# and Visual Basic, and the creation of an external XML mapping file. The Object Relational Designer also allows you to edit an existing DBML file, dynamically importing existing tables, views, stored procedures, and user-defined functions from an existing SQL Server database.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://programminglinq.com/files/folders/programming_microsoft_linq/entry135.aspx"&gt;&lt;strong&gt;Chapter 16 - LINQ and ASP.NET&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;This chapter showed you how to leverage the new features and controls available in ASP.NET 3.5 to develop data-enabled Web applications, using LINQ to SQL and LINQ in general. Consider that what you have seen is really useful for rapidly defining Web site prototypes and simple Web solutions. On the other hand, in enterprise-level solutions you will probably need at least one intermediate layer between the ASP.NET presentation layer and the data persistence one, represented by LINQ to SQL. In real enterprise solutions, you usually also need a business layer that abstracts all business logic, security policies, and validation rules from any kind of specific persistence layer. And you will probably have a Model-View-Controller or Model-View-Presenter pattern governing the UI. In this more complex scenario, chances are that the LinqDataSource control will be tied to entities collections more often than to LINQ to SQL results.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The following is the complete list of the chapters included in the book.  &lt;p&gt;&lt;strong&gt;Programming Microsoft LINQ&lt;/strong&gt;  &lt;ul&gt; &lt;li&gt;&lt;b&gt;Part I LINQ FOUNDATIONS&lt;/b&gt;  &lt;ul&gt; &lt;li&gt;1 LINQ Introduction  &lt;li&gt;2 LINQ Syntax Fundamentals  &lt;li&gt;3 LINQ to Objects&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;&lt;b&gt;Part II LINQ to Relational Data&lt;/b&gt;  &lt;ul&gt; &lt;li&gt;4 LINQ to SQL: Querying Data  &lt;li&gt;5 LINQ to SQL: Managing Data  &lt;li&gt;6 Tools for LINQ to SQL  &lt;li&gt;7 LINQ to DataSet  &lt;li&gt;8 LINQ to Entities &lt;/li&gt;&lt;/ul&gt; &lt;li&gt;&lt;b&gt;Part III LINQ and XML&lt;/b&gt;  &lt;ul&gt; &lt;li&gt;9 LINQ to XML: Managing the XML Infoset  &lt;li&gt;10 LINQ to XML: Querying Nodes&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;&lt;b&gt;Part IV Advanced LINQ&lt;/b&gt;  &lt;ul&gt; &lt;li&gt;11 Inside Expression Trees  &lt;li&gt;12 Extending LINQ  &lt;li&gt;13 Parallel LINQ  &lt;li&gt;14 Other LINQ Implementations &lt;/li&gt;&lt;/ul&gt; &lt;li&gt;&lt;b&gt;Part V Applied LINQ&lt;/b&gt;  &lt;ul&gt; &lt;li&gt;15 LINQ in a Multitier Solution  &lt;li&gt;16 LINQ and ASP.NET  &lt;li&gt;17 LINQ and WPF/Silverlight  &lt;li&gt;18 LINQ and the Windows Communication Foundation&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;&lt;b&gt;Appendixes&lt;/b&gt;  &lt;ul&gt; &lt;li&gt;A ADO.NET Entity Framework  &lt;li&gt;B C# 3.0: New Language Features  &lt;li&gt;C Visual Basic 2008: New Language Features&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=136" width="1" height="1"&gt;</description></item><item><title>To join or not to join: that is the question (in LINQ)</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/06/18/to-join-or-not-to-join-that-is-the-question-in-linq.aspx</link><pubDate>Tue, 17 Jun 2008 21:22:00 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:132</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;A comment received by one reader of &lt;A class="" href="http://www.amazon.com/gp/product/0735624003/?tag=se04-20"&gt;Programming LINQ&lt;/A&gt; suggested me to underline a concept that is not so intuitive using LINQ, especially if you come from years of SQL coding.&lt;/P&gt;
&lt;P&gt;The idea is very simple. Two entities in LINQ might be related in the model. Whenever this happen, usually it is better to leverage on this existing relationship and not to write the join syntax in an explicit way.&amp;nbsp;If you are using&amp;nbsp;LINQ to SQL, the&amp;nbsp;generated SQL code might be&amp;nbsp;more performant or at least&amp;nbsp;correspondant to the one generated by writing an explicit join in your LINQ query. The less constraints in your query, the better.&lt;/P&gt;
&lt;P&gt;Let's look at an example on the Northwind database. Imagine you want to see&amp;nbsp;a list of all categories with a flag set for the one which a particular product belongs to. This is a SQL query we could write:&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;SELECT&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;CategoryID&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;CategoryName&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CASE&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;WHEN&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; p&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;ProductID &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;IS&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;NULL&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; THEN&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 0&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 1&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;END&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Selected&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;FROM&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Categories c&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;LEFT&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;JOIN&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Products p&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ON&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; p&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;CategoryID &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; c&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;CategoryID&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; p&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;ProductID &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 10&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;ORDER&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;BY&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; CategoryName&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Ok, we can write the same query in many other ways, but there are several more complex situations where a LEFT JOIN is used to test the presence of an element in a related table. A correspondant LINQ query might be the following one:&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;from&lt;/FONT&gt; c &lt;FONT color=#0000ff&gt;in&lt;/FONT&gt; dc.Categories&lt;BR&gt;&lt;FONT color=#0000ff&gt;orderby&lt;/FONT&gt; c.CategoryName&lt;BR&gt;&lt;FONT color=#0000ff&gt;join&lt;/FONT&gt; p &lt;FONT color=#0000ff&gt;in&lt;/FONT&gt; dc.Products.Where(p =&amp;gt; p.ProductID == 10)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on&lt;/FONT&gt; c.CategoryID &lt;FONT color=#0000ff&gt;equals&lt;/FONT&gt; p.CategoryID&amp;nbsp;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; into&lt;/FONT&gt; pj&lt;BR&gt;&lt;FONT color=#0000ff&gt;from&lt;/FONT&gt; x &lt;FONT color=#0000ff&gt;in&lt;/FONT&gt; pj.DefaultIfEmpty()&lt;BR&gt;&lt;FONT color=#0000ff&gt;select&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;new&lt;/FONT&gt; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.CategoryID,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.CategoryName,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Selected = x != &lt;FONT color=#0000ff&gt;null&lt;BR&gt;&lt;/FONT&gt;};&lt;/P&gt;
&lt;P&gt;The LINQ query above will generate a SQL query containing a LEFT JOIN statement. However, a relationship exists between Categories and Customer, and you can leverage on this relationship in the point where you really need to traverse the relationship (in the projection statement). The following one is a better way to get the same result:&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;from&lt;/FONT&gt; c &lt;FONT color=#0000ff&gt;in&lt;/FONT&gt; dc.Categories&lt;BR&gt;&lt;FONT color=#0000ff&gt;orderby&lt;/FONT&gt; c.CategoryName&lt;BR&gt;&lt;FONT color=#0000ff&gt;select&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;new&lt;/FONT&gt; { &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.CategoryID,&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.CategoryName,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Selected = c.Products.Any( p =&amp;gt; p.ProductID == 10 ) ? &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt; : &lt;FONT color=#0000ff&gt;false&lt;/FONT&gt; &lt;BR&gt;};&lt;/P&gt;
&lt;P&gt;This new version has two advantages. First, it&amp;nbsp;is shorter and&amp;nbsp;express its intent more explicitly. &amp;nbsp;Second, it generates a SQL query with an EXISTS statement, similar to the following one.&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;SELECT&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; CategoryID&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; CategoryName&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;CASE&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;WHEN&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#808080 size=2&gt;EXISTS(&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;SELECT&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;NULL&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; [EMPTY]&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;FROM&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Products &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; p&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;WHERE&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;p&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;ProductID &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 10&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;AND&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;p&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;CategoryID &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; c&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;CategoryID&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;THEN&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 1&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;ELSE&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 0&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;END&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Selected&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;FROM&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Categories &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; c&lt;BR&gt;&lt;FONT color=#0000ff&gt;ORDER&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;BY&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; CategoryName&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;The execution plan used by SQL Server might be similar if not equal. However, using the implicit relationship between Categories and Products in the LINQ query is usually better, because it gives more freedom to the LINQ provider to generate a more efficient SQL code.&lt;/P&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=132" width="1" height="1"&gt;</description><category domain="http://introducinglinq.com/blogs/marcorusso/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://introducinglinq.com/blogs/marcorusso/archive/tags/Join/default.aspx">Join</category></item><item><title>TechEd interview</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/06/06/interview-available-on.aspx</link><pubDate>Thu, 05 Jun 2008 15:49:00 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:131</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;I and Paolo have been interviewed at TechEd by Ken Rosen. We talk about our experience as book authors.&lt;/P&gt;
&lt;P&gt;If you are interested in writing a book, or if you simply want to see our faces and hear our italian accent, you can watch the video available in both &lt;A class="" href="http://mfile.akamai.com/14853/wmv/microsofttec.download.akamai.com/14853/TechEdOnline/Videos/08_NA_Dev_techtalk_12_low.asx"&gt;low resolution&lt;/A&gt; and &lt;A class="" href="http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_techtalk_12_high.wmv"&gt;high resolution&lt;/A&gt;. Enjoy!&lt;/P&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=131" width="1" height="1"&gt;</description><category domain="http://introducinglinq.com/blogs/marcorusso/archive/tags/Interview+video/default.aspx">Interview video</category></item><item><title>TechEd 2008 book signing</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/06/03/teched-2008-book-signing.aspx</link><pubDate>Mon, 02 Jun 2008 13:49:00 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:130</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;I'm already in Orlando for &lt;A class="" href="http://www.microsoft.com/events/teched2008/developer/default.mspx"&gt;&lt;FONT color=#555555&gt;TechEd 2008 Developers&lt;/FONT&gt;&lt;/A&gt;. Tomorrow I and Paolo Pialorsi will be at the TechEd bookshop for a book signing of our just released &lt;A class="" href="http://www.amazon.com/gp/product/0735624003/?tag=se04-20"&gt;&lt;FONT color=#555555&gt;Programming Microsoft LINQ&lt;/FONT&gt;&lt;/A&gt;, scheduled at 4:00PM-4:30PM. I wrote a post a few days a go with the list of chapters included in the book. LINQ to SQL and LINQ to Entities are two technologies that are significative to access data, even if you don't have to use them in every possible scenario.&lt;/P&gt;
&lt;P&gt;If you are attending to TechEd, meet us tomorrow at the bookshop to talk about LINQ!&lt;/P&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=130" width="1" height="1"&gt;</description><category domain="http://introducinglinq.com/blogs/marcorusso/archive/tags/LINQ+TechEd/default.aspx">LINQ TechEd</category></item><item><title>Programming Microsoft LINQ finally shipping</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/05/26/programming-microsoft-linq-finally-shipping.aspx</link><pubDate>Sun, 25 May 2008 21:19:00 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:129</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;P class=MsoNormal style="MARGIN:0cm 0cm 10pt;"&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT face=Calibri size=3&gt;Finally, the Programming Microsoft LINQ book &lt;/FONT&gt;&lt;A href="http://www.amazon.com/gp/product/0735624003/?tag=se04-20"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;is available&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;. We updated the website that supports our books (&lt;/FONT&gt;&lt;A href="http://programminglinq.com/"&gt;&lt;FONT face=Calibri size=3&gt;http://programminglinq.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;), where you can download the sample code of the book.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0cm 0cm 10pt;"&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;What’s in this book? Well, we tried to cover everything that was in RTM, but we also introduced technologies that are still in beta or in early CTP stages, like LINQ to Entities and Parallel LINQ. To give you an idea of the content, at the end of this post there is a list of the chapters included in the book.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0cm 0cm 10pt;"&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Now, the next news is that we will be at TechEd Developers next week in Orlando. Feel free to contact us if you want to give us feedback about the book or if you simply want to talk about LINQ. Moreover, we will be at the bookshop for book signing on June 3rd from 4:00pm to 4:30pm. We hope to see you there!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0cm 0cm 10pt;"&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;STRONG&gt;Programming &lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Microsoft &lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;LINQ&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN:0cm 0cm 0pt 36pt;TEXT-INDENT:-18pt;mso-list:l0 level1 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:Symbol;mso-ansi-language:EN-US;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Part I LINQ FOUNDATIONS&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;1 LINQ Introduction&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;2 LINQ Syntax Fundamentals &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;3 LINQ to Objects&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 36pt;TEXT-INDENT:-18pt;mso-list:l0 level1 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:Symbol;mso-ansi-language:EN-US;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Part II LINQ to Relational Data&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;4 LINQ to SQL: Querying Data &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;5 LINQ to SQL: Managing Data &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;6 Tools for LINQ to SQL&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;7 LINQ to DataSet &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;8 LINQ to Entities &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 36pt;TEXT-INDENT:-18pt;mso-list:l0 level1 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:Symbol;mso-ansi-language:EN-US;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Part III LINQ and XML&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;9 LINQ to XML: Managing the XML Infoset&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;10 LINQ to XML: Querying Nodes&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 36pt;TEXT-INDENT:-18pt;mso-list:l0 level1 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:Symbol;mso-ansi-language:EN-US;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Part IV Advanced LINQ&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;11 Inside Expression Trees&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;12 Extending LINQ &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;13 Parallel LINQ &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;14 Other LINQ Implementations &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 36pt;TEXT-INDENT:-18pt;mso-list:l0 level1 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:Symbol;mso-ansi-language:EN-US;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Part V Applied LINQ&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;15 LINQ in a Multitier Solution &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;16 LINQ and ASP.NET&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;17 LINQ and WPF/Silverlight&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;18 LINQ and the Windows Communication Foundation&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 36pt;TEXT-INDENT:-18pt;mso-list:l0 level1 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:Symbol;mso-ansi-language:EN-US;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Appendixes&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;A ADO.NET Entity Framework&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0cm 0cm 0pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;B C# 3.0: New Language Features&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN:0cm 0cm 10pt 72pt;TEXT-INDENT:-18pt;mso-add-space:auto;mso-list:l0 level2 lfo1;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-ansi-language:EN-US;mso-fareast-font-family:'Courier New';"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;C Visual Basic 2008: New Language Features&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0cm 0cm 10pt;"&gt;&lt;SPAN style="mso-ansi-language:EN-US;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=129" width="1" height="1"&gt;</description><category domain="http://introducinglinq.com/blogs/marcorusso/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>VS2008 SP1 brings a new build of ADO.NET Entity Framework and LINQ to Entities</title><link>http://introducinglinq.com/blogs/paolopialorsi/archive/2008/05/19/vs2008-sp1-brings-a-new-build-of-ado-net-entity-framework-and-linq-to-entities.aspx</link><pubDate>Sun, 18 May 2008 15:01:16 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:127</guid><dc:creator>Paolo.Pialorsi</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;In the last days has been released the beta version of Visual Studio 2008 Service Pack 1, including a refresh build of ADO.NET Entity Framework and LINQ to Entities. &lt;a href="http://blogs.msdn.com/adonet/archive/2008/05/12/what-s-new-in-the-sp1-beta.aspx"&gt;Here&lt;/a&gt; you can find what's new in this build. And &lt;a href="http://blogs.msdn.com/adonet/pages/entity-framework-breaking-changes-visual-studio-2008-net-3-5-sp1-beta.aspx"&gt;here&lt;/a&gt; you can find the breaking changes. These changes will affect also the samples and content of our new book, based on the previous build of ADO.NET Entity Framework and LINQ to Entities.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=127" width="1" height="1"&gt;</description></item><item><title>A new LINQ Query Provider: LINQ4SP</title><link>http://introducinglinq.com/blogs/paolopialorsi/archive/2008/05/18/a-new-linq-query-provider-linq4sp.aspx</link><pubDate>Sun, 18 May 2008 07:39:17 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:126</guid><dc:creator>Paolo.Pialorsi</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I've just seen the &lt;a href="http://www.sharepointblogs.com/aghy/archive/2008/05/08/announcing-linq4sp.aspx"&gt;announcement&lt;/a&gt; of a new LINQ query provider targeting SharePoint contents. It looks really cool and interesting and I'm wondering to play with it. As soon as I started working on LINQ (3 years ago) I thought that a LINQ query provider for SharePoint would have been a good and useful example of a custom query provider implementation. Now that LINQ has been shipped such implementations are coming out, great!&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=126" width="1" height="1"&gt;</description></item><item><title>New book "Programming Microsoft LINQ" available and site update</title><link>http://introducinglinq.com/blogs/paolopialorsi/archive/2008/05/15/new-book-programming-microsoft-linq-available-and-site-update.aspx</link><pubDate>Wed, 14 May 2008 22:46:00 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:124</guid><dc:creator>Paolo.Pialorsi</dc:creator><slash:comments>1</slash:comments><description>&lt;P&gt;Starting from today we've updated the LINQ Books Web Site (&lt;A href="http://www.programminglinq.com/)"&gt;&lt;FONT color=#669966&gt;http://www.programminglinq.com/)&lt;/FONT&gt;&lt;/A&gt; in order to support the new "Programming Microsoft LINQ" book that is publicly available since today (May 14th 2008). 
&lt;P&gt;In the download area you can find the whole set of code samples, while on &lt;A href="http://www.amazon.com/gp/product/0735624003/?tag=se04-20"&gt;&lt;FONT color=#669966&gt;Amazon&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;you can order the physical book. 
&lt;P&gt;We hope you will appreciate our efforts to write a useful and complete (as much as we could) book about LINQ and its related technologies.&lt;/P&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=124" width="1" height="1"&gt;</description></item><item><title>LINQ Framework Design Guidelines</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/05/11/linq-framework-design-guidelines.aspx</link><pubDate>Sun, 11 May 2008 11:01:25 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:120</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I just want to link &lt;a href="http://blogs.msdn.com/mirceat/archive/2008/03/13/linq-framework-design-guidelines.aspx"&gt;this post&lt;/a&gt; from Mircea Trofin with LINQ Framework Design Guidelines, which are very interesting if you want to extend LINQ in some way. In our upcoming Programming Microsoft LINQ book we wrote a whole chapter titled "Extending LINQ" and this post is a very good integration.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=120" width="1" height="1"&gt;</description></item><item><title>LINQ to Regex</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/05/09/linq-to-regex.aspx</link><pubDate>Thu, 08 May 2008 23:36:39 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:119</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Within 2 weeks our new Programming Microsoft LINQ should be finally available! Today I just read a post about a &lt;a href="http://weblogs.asp.net/rosherove/archive/2008/05/06/introducing-linq-to-regex.aspx"&gt;LINQ to Regex&lt;/a&gt; implementation that we would have covered in our book if only we had a time machine.&lt;/p&gt; &lt;p&gt;When I thought at LINQ implementations in the past, I always underestimated that even if you use LINQ for a merely 1% of its capabilities, sometimes the Intellisense-enabling nature of LINQ is a good enough reason to switch your library-interface to a LINQ model. In reality, most of it is the magic of Intellisense + Extension Methods. Even if I don't use Regex very often, LINQ to Regex illustrated an illuminating concept to me.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=119" width="1" height="1"&gt;</description></item><item><title>LINQ adopted by Microsoft Robotics SDK</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/04/11/linq-adopted-by-microsoft-robotics-sdk.aspx</link><pubDate>Fri, 11 Apr 2008 09:06:17 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:114</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The new &lt;a href="http://msdn2.microsoft.com/robotics"&gt;CTP of Microsoft Robotics Developer Studio&lt;/a&gt; implements a LINQ query syntax to define Data Contract Filters on DSS (Decentralized Software Services). I don't have a real experience on Robotics SDK, but I looked at documentation for the LINQ implementation and this is a good example of the use of LINQ in an environment unrelated to relational databases.&lt;/p&gt; &lt;p&gt;Looking at these examples, I thought that an interesting LINQ application is the definition of filters on subscription services just as the Robotics SDK does. This mean acquisition of data changing in real-time (ok, soft real-time...). The flexibility offered by IQueryable is great.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=114" width="1" height="1"&gt;</description></item><item><title>LINQPad is a very good tool</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/04/07/linqpad-is-a-very-good-tool.aspx</link><pubDate>Sun, 06 Apr 2008 22:54:11 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:110</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I recently used &lt;a href="http://www.linqpad.net/"&gt;LINQPad&lt;/a&gt; and I have to say that is a very very good tool. You can use it to test your LINQ query in a very interactive way. If you want to test LINQ to SQL, it automatically generates the necessary DataContext class and give you an environment test to execute your LINQ queries.&lt;/p&gt; &lt;p&gt;A very missing feature is the AutoComplete, but a future release might include it. However, using it is already a benefit for your productivity.&lt;/p&gt; &lt;p&gt;If you teach classes or speak at conferences, this is absolutely a must-have tool.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=110" width="1" height="1"&gt;</description></item><item><title>Writing LINQ friendly libraries</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/03/16/writing-linq-friendly-libraries.aspx</link><pubDate>Sat, 15 Mar 2008 16:31:22 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:105</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The beautiful post &lt;a href="http://blogs.msdn.com/mirceat/archive/2008/03/13/linq-framework-design-guidelines.aspx"&gt;LINQ Framework Design Guidelines&lt;/a&gt; is a valuable source if you write libraries of code in .NET. The introduction of LINQ is going to change some habits and to introduce new needs. These guidelines are really useful to help you write LINQ friendly libraries.&lt;/p&gt; &lt;p&gt;It is also good for me reading that many of the guidelines posted here are aligned with suggestions and best practices we proposed in the upcoming &lt;a href="http://www.amazon.com/gp/product/0735624003/?tag=se04-20"&gt;Microsoft Programming LINQ&lt;/a&gt; book. We have just finished its writing and it will be on the shelf within May.&lt;/p&gt; &lt;p&gt;One of the interesting arguments is the &lt;em&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/em&gt; vs. &lt;em&gt;IQueryable&amp;lt;T&amp;gt;&lt;/em&gt; support. We have a whole chapter dedicated to extending LINQ, and one interesting idea (which is not forbidden by these guidelines, even if it is not explicitly suggested) is creating an &lt;em&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/em&gt; extension method receiving an &lt;em&gt;Expression&amp;lt;Func&amp;lt;&amp;gt;&amp;gt;&lt;/em&gt; instead of a &lt;em&gt;Func&amp;lt;&amp;gt;&lt;/em&gt;. We made an example of &lt;em&gt;Where&lt;/em&gt; implementation for sorted collections using this technique. The guideline explicitly suggest to implement &lt;em&gt;IQueryable&amp;lt;T&amp;gt;&lt;/em&gt; in this situation, and I agree with this. However, from a didactical point of view, I've found really interesting using this sample to introduce the more complex topic of &lt;em&gt;IQueryable&amp;lt;T&amp;gt;&lt;/em&gt; implementation.&lt;/p&gt; &lt;p&gt;Well... still two months to wait just to read in book reviews if our approach describing this complex topic was right...&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=105" width="1" height="1"&gt;</description></item><item><title>VerificationException</title><link>http://introducinglinq.com/blogs/marcorusso/archive/2008/02/05/verificationexception.aspx</link><pubDate>Tue, 05 Feb 2008 08:19:55 GMT</pubDate><guid isPermaLink="false">6f1fdd61-9c0b-497f-974b-3001d899dae0:98</guid><dc:creator>Marco.Russo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Writing the upcoming &lt;a href="http://www.microsoft.com/mspress/books/10827.aspx"&gt;Programming Microsoft LINQ&lt;/a&gt; book, I encountered the following issue in LINQ to SQL.&lt;/p&gt; &lt;p&gt;The &lt;em&gt;Link&amp;lt;T&amp;gt;&lt;/em&gt; generic type is part of the deferred loading system for LINQ to SQL entities (it allows to defer the loading of a property, while &lt;em&gt;EntityRef&amp;lt;T&amp;gt; &lt;/em&gt;works at an entity level). Link&amp;lt;T&amp;gt; is intended to be the type for a storage member used by a property of type &lt;em&gt;T&lt;/em&gt;. In a fast demo, I forgot this and I used the &lt;em&gt;Link&amp;lt;T&amp;gt;&lt;/em&gt; type directly as the type for a public data member.&lt;/p&gt; &lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;public [Column] Link&amp;lt;string&amp;gt; Address;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;This is an error that cannot be intercepted at compile time but that will throw an exception during execution. With the .NET Framework 3.5 RTM, this throws a VerificationException with the following message:&lt;/p&gt; &lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;System.Security.VerificationException: Operation could destabilize the runtime.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;I was initially scared of the destructive power of my error. Luckily, &lt;a href="http://blogs.msdn.com/dinesh.kulkarni/"&gt;Dinesh Kulkarni&lt;/a&gt; was kindly enough to explain me the reason:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;[...]You need a member of a primitive type understood by the query translator. In your example, the Link&amp;lt;T&amp;gt; member is not understood.[...]&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Of course, the exception message can be improved. I opened an &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=326868"&gt;issue on Connect&lt;/a&gt; and I hope that this blog entry will help who will encounter this same issue in the future.&lt;/p&gt;&lt;img src="http://introducinglinq.com/aggbug.aspx?PostID=98" width="1" height="1"&gt;</description></item></channel></rss>