Welcome Guest!
Create Account | Login
Locator+ Code:

Search:
FTPOnline Channels Conferences Resources Hot Topics Partner Sites Magazines About FTP RSS 2.0 Feed

Click here to receive your FREE subscription to Visual Studio Magazine

email article
printer friendly
get the code
more resources

LINQ Takes Shape in May CTP
Language Integrated Query (LINQ) prepares to join the Visual Studio "Orcas" upgrade with a new graphic DLinq Designer, better support for bound controls, and almost parity for C# 3.0 and VB 9.0 programmers.
by Roger Jennings

May 15, 2006

The Language Integrated Query (LINQ) May 2006 Community Technical Preview (CTP), which Microsoft released on May 10, 2006, adds a raft of new and improved DLinq and XLinq features to the VB-centric January 2006 CTP (see Resources). Optionally, the new CTP updates the C# components of the PDC 2005 LINQ Technical Preview to provide all DLinq features and most XLinq capabilities to C# LINQ projects. These additions are the first step in productizing LINQ for inclusion in the next release of Visual Studio, presently code-named "Orcas." I'll start by giving you a brief summary of new and improved VB 9.0 and C# 3.0 features, and then dig deeper into the latest domain-specific DLinq component additions with illustrated, step-by-step examples and sample VB code that you can download here.

ADVERTISEMENT

In an unexpected turn of events, Visual Basic appears to have become the favored language for hardcore LINQ and especially XLinq developers. C-Omega (Cω), LINQ's forerunner, is a C# derivative, and DLinq worked only for C# projects in the initial PDC 2005 release. However, Erik Meijer—a major force behind Cω's development—announced in September 2005 that Visual Basic had become his programming language of choice. His reasons for the move are that VB "allows static typing where possible and dynamic typing where necessary in the form of relaxed delegates, improved nullable support, dynamic identifiers ... and last but not least dynamic interfaces." These features enabled Paul Vick's VB team to outpace their C# colleagues in the process of adding advanced domain-specific LINQ features, especially to XLinq.

For VB developers, the May 2006 CTP adds these new features to the January 2006 CTP:

  • A graphical DLinq Designer replaces SQLMetal.exe command-line statements with a visual design surface for creating DLinq entity classes. You drag tables from the Server Explorer to the DLinq Designer window and then create a DLinq Data Source with the Data Source Configuration Wizard. The Designer detects table relationships and creates "DLinq associations" between the tables.
  • A graphical DLinq visualizer helps you debug queries
  • DLinq now supports table inheritance, stored procedures, user-defined functions, optimistic concurrency conflict resolution (OCCR), multitier entities, remote and local entity sets, and XML mapping files.
  • LINQ over DataSet adds a new component to query DataSets and DataTables; offers DistinctRows, EqualAllRows, UnionRows, IntersectRows, and ExceptRows operators that return DataRows; and provides the ToDataTable() method to return a DataTable from a sequence.
  • LINQ queries now support Group By query comprehensions.
  • XML literals get outlining support in the VB editor window. Outlining lets you collapse or expand XML element literals that occupy more than one line.
  • XML axis properties (IEnumerable(Of XElement) and IEnumerable(Of XAttribute)) get a Value extension property, which detects the first object in an IEnumerable(Of <T>); if the object exists, the Value property is called on it.

For more details on new DLinq features for VB 9.0, see the DLinq Overview for VB Developers.doc file's Chapter 7, "New For Spring 2006." You also should review the new LINQ Over DataSet for VB Developers.doc and the updated Visual Basic 9.0 Overview.doc files.

The LINQ May 2006 CTP makes these changes to the January 2006 CTP's VB features:

Prerequisites for installing the VB 9.0 feature set are Visual Basic 2005 Express edition or later and, if you want to run the DLinq samples, SQL Server 2000a or SQL Server 2005 Express edition or later. DLinq remains tied to SQL Server, but Microsoft promises to provide assistance to other RDBMS vendors who want to write DLinq-enabled native data providers. The CTP doesn't include a sample provider.




Back to top













Java Pro | Visual Studio Magazine | Windows Server System Magazine
.NET Magazine | Enterprise Architect | XML & Web Services Magazine
VSLive! | Thunder Lizard Events | Discussions | Newsletters | FTPOnline Home