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

Published 09 October 07 10:14 by Dinesh.Kulkarni

Comments

# Noticias externas said on October 10, 2007 1:42 AM:

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

# Roller said on October 10, 2007 5:03 AM:

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

# Charlie Calvert's Community Blog said on October 15, 2007 8:02 AM:

Welcome to the thirty-third edition of Community Convergence. This week we have a new video called Programming

# Mike Taulty's Blog said on October 18, 2007 6:11 AM:

Dinesh has a list of changes here. If you're using LINQ to SQL then this will have an impact on you....

# Cristian's Blog said on October 28, 2007 5:48 AM:

If you work with LINQ to SQL then you might want to take a look at this posts of Dinesh Kulkarni: LINQ

# Guy Burstein [MVP] said on November 21, 2007 2:14 AM:

LINQ to SQL Breaking Changes from Visual Studio 2008 Beta 2 to RTM With the release of Visual Studio

# Technoeuphoria! said on November 28, 2007 9:32 AM:

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

# Is This Thing On? said on November 28, 2007 12:12 PM:

I had planned on doing a big article on this and it turns out someone beat me to the punch. Dinesh wrote

# { The Smoking Code } said on November 28, 2007 6:08 PM:

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

# 曹振华 said on December 2, 2007 8:51 PM:

FollowScottGuthrie的例子学习LINQ,结果找了半天也没有找到Table

# lxy_abcde1190 said on April 20, 2008 8:48 AM:

Visual Studio 2008 LINQ to SQL 的Beta 2测试版和RTM正式版的差异

# Jocelyn said on December 17, 2008 5:51 AM:

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

# jocelyn said on January 6, 2009 7:07 AM:

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

New Comments to this post are disabled

About Dinesh.Kulkarni

I am a program manager in the Visual C# Product Unit of Microsoft. I am currently working on the LINQ project with specific responsibility for DLinq. Previously, I have been in a PM in SQL Server working on ObjectSpaces and DataSet. In pre-MS life, I have worked for companies ranging from startup to IBM on a wide range of software projects. Before I started working, I did M.S.E.E. and Ph.D. (CSE) from the University of Notre Dame and B.Tech. E.E. from IIT Bombay, India.

Search

This Blog

Syndication

Page view tracker