Freigeben über


LINQ to SQL breaking changes from beta2 to RTM (compiled from my LINQ forum posts)

Now that we are in the final weeks of locking down for RTM, it is worth tallying up the changes. Since betas are a bit experimental and intended for receiving feedback, the fact that there are changes shouldn't be surprising but we could do a better job of communicating the changes to our best customers - beta users and early adopters who help us polish the technology and take us to task for anything wacky (not just buggy). So here is a humble attempt to take a step in that direction

This post is just going to be a bunch of links to posts that have already covered this on LINQ forum.

LINQ to SQL Beta2 to RTM Key Changes

PLEASE READ: Beta2 to RTM Changes in Attach() Behavior

Beta2 to RTM change: XML column default mapping changed to XElement instead of XDocument

Beyond these salient ones, we are also working on a more detailed list to help you migrate smoothly from beta2 to RTM or to get your books, articles, blogs etc. in shape for .NET 3.5 / Visual Studio 2008 release. As I can scrape together some time, I am working on updating the LINQ to SQL paper that has not been updated since beta1 (so I won't even put URL for it until I do some badly needed updates)

10/10/07 Addition:

This is really a bug fix but worth mentioning in case the erroneous result went unnoticed in your code on beta2 and the exception on RTM build surprises you:

The intent was to not allow "partial entities" created through object initializer in projection. So the following query should have resulted in exception:

            var q2 = from c in nw.Customers

                     where c.City.StartsWith("M")

                     select new Customer

                     {

                         ContactName = c.ContactName,

                         City = c.City

                     };

Instead, in beta2, this query executed and gave n copies of the first object where n is the total number of rows produced by the generated SQL. This bug has now been fixed and the query will result in an exception. The main reason is that we don't want downstream confusion e.g. some path relying on Customer.Orders collection or an UPDATE statement created using uninitialized values. Of course, you can do the intended projection above with an anonymous or separate nominal type.

10/17/07 Addition

Mike Warriner pointed out another important one that I had missed: Beta2 dbml file needs to be opened and saved to get the right unicode encoding. On that note, as I have pointed out in the post, I would not use generated code from beta2 at all. I would suggest using the dbml file from beta2 project and regenerating code using designer (saving is enough to re-gen) or SqlMetal as appropriate. It is not a good idea to use the beta2 generated code with the RTM run-time.

Dinesh

Comments

  • Anonymous
    October 09, 2007
    Now that we are in the final weeks of locking down for RTM, it is worth tallying up the changes. Since

  • Anonymous
    October 09, 2007
    Now that we are in the final weeks of locking down for RTM, it is worth tallying up the changes. Since

  • Anonymous
    October 15, 2007
    Welcome to the thirty-third edition of Community Convergence. This week we have a new video called Programming

  • Anonymous
    October 17, 2007
    Dinesh has a list of changes here. If you're using LINQ to SQL then this will have an impact on you....

  • Anonymous
    October 27, 2007
    If you work with LINQ to SQL then you might want to take a look at this posts of Dinesh Kulkarni: LINQ

  • Anonymous
    November 20, 2007
    LINQ to SQL Breaking Changes from Visual Studio 2008 Beta 2 to RTM With the release of Visual Studio

  • Anonymous
    November 28, 2007
    For those who have been working on LINQ to SQL, this post is a compilation of the breaking changes from

  • Anonymous
    November 28, 2007
    The comment has been removed

  • Anonymous
    November 28, 2007
    LINQ to SQL breaking changes from beta2 to RTM (compiled from my LINQ forum posts)

  • Anonymous
    December 02, 2007
    FollowScottGuthrie的例子学习LINQ,结果找了半天也没有找到Table

  • Anonymous
    April 20, 2008
    Visual Studio 2008 LINQ to SQL 的Beta 2测试版和RTM正式版的差异

  • Anonymous
    December 16, 2008
    For those who have been working on LINQ to SQL, this post is a compilation of the breaking changes from

  • Anonymous
    January 05, 2009
    For those who have been working on LINQ to SQL, this post is a compilation of the breaking changes from