LINQ to SQL class designer

No longer fails when using clauses are added to the partial user class

VarChar(1) now correctly maps to string and not char

Decimal precision and scale are now emitted correctly in the DbType attributes for stored procedures

Foreign key changes will be picked up when bringing tables back into the designer without a restart

Code generation (SQL Metal + LINQ to SQL class designer)

Stored procedures using original values now compiles when the entity and context namespaces differ

Virtual internal now generates correct syntax

Mapping attributes are now fully qualified to prevent conflicts with user types

KnownTypeAttributes are now emitted for DataContractSerializer with inheritance

Delay-loaded foreign keys now have the correct, compilable, code generated

Using stored procedures with concurrency no longer gets confused if entities in different namespace to context

ForeignKeyReferenceAlreadyHasValueException is now thrown if any association is loaded not just the first

Potentially breaking changes

We worked very hard to avoid breaking changes but of course any potential bug fix is a breaking change if your application was depending on the wrong behavior. The ones I specifically want to call out are:

Skip(0) is no longer a no-op

The special-casing of 0 for Skip to be a no-op was causing some subtle issues such as eager loading to fail and we took the decision to stop special casing this. This means if you had syntax that was invalid for a Skip greater than 0 it will now also be invalid for skip with a 0. This makes more sense and means your app would break on the first page now instead of subtlety breaking on the second page. Fail fast :)

ForeignKeyReferenceAlreadyHasValue exception

If you are getting this exception where you weren’t previously it means you have an underlying foreign key with multiple associations based on it and you are trying to change the underlying foreign key even though we have associations loaded.Best thing to do here is to set the associations themselves and if you can’t do that make sure they aren’t loaded when you want to set the foreign key to avoid inconsistencies.