LINQ to SQL (fka DLinq): What's new in Orcas beta2

Orcas beta2 is here for you. This is significantly ahead of beta1 and pretty close to the final feature set of Orcas for most components. The releases are available both as regular installs and as VPC images.  

Now that Orcas beta2 has been released, it is time to look at what's new there. But first, a general sense of how beta2 shaped up. Beta1 released in spring was mostly productization of the May 2006 LINQ CTP. So those who played with it only a little bit did not see a big change over May 2006 CTP - just API tweaks, more robustness etc.

Beta2 is a different animal. This is the first time we are able to do substantial additional features and reorg of features after wrapping up the core functionality for beta1. So here is what to look for:

  1. Significantly enriched code-gen: Looks for partial methods on DataContext and entity classes that can be extended in your partial class. Examples include
    1. Property setter validation methods (pre/post)
    2. Entity initialization and validation methods
    3. Create/Update/Delete (CUD) override methods (e.g. UpdateCustomer())
  2.  Unification of code gen. Now SqlMetal's code generator also powers the beautiful LINQ to SQL designer. So you can use either tool to gen your classes and get consistent results.
  3. LinqDataSource for your web apps that modify data but don't want to include a ton of custom code.
  4. Revamped and rationalized WinForms databinding support (no more ToBindingList() needed)
  5. Tonnes of perf improvements across the board. Rico has already blogged about this a lot. 
  6. Streamlined and enhanced support for detached objects (see Attach() APIs) for multi-tier apps
  7. SQL Server Compact (fka SQL CE) support in LINQ to SQL runtime and SqlMetal (though not in the designer)
  8. Better APIs for getting commands and changed objects (GetChangeSet/GetCommand instead of GetChangeText/GetQueryText)
  9. Inheritance enhancements - a relationship can be added in a derived class and a relationship to a derived class is now supported
  10. Partial trust support - now you can use it in ASP.NET medium trust with the addition of RestrictedMemberAccess permission
  11. Better serialization
  12. 500+ fewer bugs :-)
  13. Sweet sample - query visualizer is back by popular demand after disappearing in beta1 for a design overhaul.
  14. Lots of improvements in the designer for sproc handling - especially for insert/update/delete. But that is almost a separate topic best handled elsewhere
  15. A sweet mystery feature to give the power of dot to sprocs - more about it in a later post

Now I just have to update the online LINQ to SQL paper by crazily writing stuff over the next few days and provide the gist on my blog.