New CTP for LINQ
Yes, another
CTP for Linq, May 2006and it includes VB9 support
New features are added
What’s new?
LINQ:
- IQueryable<T> enables
pluggable query processors.
- ToQueryable provides a way to get
an expression tree from an IEnumerable<T> so that a pluggable query
processor can optimize and execute it
- Expression.Compile enables
compilation of an expression tree for in-memory execution
- Join support has been added: Join
operator provides inner equi-join and a powerful GroupJoin operator retains the
hierarchical structure while providing additional outer-join like
capabilities
- A family of additional operators:
Single, SingleOrDefault, Last, LastOrDefault, ElementAt,
ElementAtOrDefault
C# Language:
- Query expressions now provide:
- Join syntax for using Join and
GroupJoin
- Let clause for declaring temporary
variables in query expression
- Lambda statement blocks are enabled
in addition to lambda expressions
C# IDE:
- Support for copy-pasting XML for
simplified use of XLinq
DLinq:
- A graphical designer has been added
for generating mapped classes. This designer requires Visual Studio 2005
Professional Edition or above.
- Inheritance
- Multi-tier entity support
- Enhanced support for stored
procedures and user-defined functions
- Improved concurrency conflict
resolution
- Remote / local EntitySet
- XML mapping file
- Additional .NET functions
XLinq
- Supports annotations, an
extensibility point for user data
- Improved support for XML mixed
content
- Support for streaming output
LINQ over
DataSet:
- Adds new LINQ component to query
DataTables – implements the LINQ query pattern including join
- Adds DataSet-specific operators
like DistinctRows, UnionRows for traditional relational set operations
- Provides ToDataTable() operator to
get a DataTable from a sequence
Miscellaneous:
- Web project template that allows
prototype C# compiler to be used in web projects
- WinForms and ASP.NET databinding
samples
- An expression tree visualizer for
better inspection of expression trees
- A DLinq query visualizer for better
debugging experience
C# Support:
The installer sets up
several LINQ project templates (LINQ Windows Application, LINQ Web Site, LINQ
Console Application, LINQ WinFX Application and LINQ Library) that you can use
to create your own C# 3.0 projects using LINQ.
IDE Support (for Visual Studio 2005/C# 2005 Express):
Project
LINQ relies on several changes to the C# language. C# 3.0 contains new keywords
and syntax that are not considered valid by the Visual Studio 2005 IDE. The
result is that editing LINQ-enabled C# code can be difficult: For example, there
is no IntelliSense™ support for the new language features, errors are
incorrectly reported in the output window, and the code editor underlines valid
C# 3.0 code with red squiggles. A modified C# language service has been created
to help alleviate these problems in the IDE, to provide the new keywords in the
completion list, and to provide extension methods in IntelliSense™.
While this preliminary IDE support
greatly enhances the editing experience when writing C# 3.0 code in VS 2005, the
language service and compiler are still very much in an alpha phase. In the
event of a compiler error, many more errors may be reported than are actually
present. If you see a large number of errors when building C# 3.0 code, fix the
top error in the error list first and build after each fix.
Follow these steps to enable LINQ
IDE support for Visual Studio 2005 and Visual C# 2005 Express:
- First, verify that you are running
the release version of Visual Studio 2005 or Visual C# 2005 Express. The
language service that will be installed only works with the English version of
VS 2005/C# 2005 Express and may cause severe problems if installed on earlier
versions. You can verify your version by selecting Help\About in Visual Studio
2005.
- Shut down any running instances of
Visual Studio.
- Open the \bin
folder under the LINQ preview installation directory and run “Install C# IDE
Support”.
- Start VS 2005/C# 2005
Express.
Follow these steps to restore your
original VS 2005/C# 2005 Express language service:
- Shut down any running instances of
Visual Studio.
- Open the \bin
folder under the LINQ preview installation directory and run “Uninstall C# IDE
Support”.
- Start VS 2005/C# 2005 Express.
Visual Basic Support:
If you also have Visual
Basic installed on your machine, the files for preview for Visual Basic are
installed. The readme for Visual Basic can be found here. The preview files for Visual Basic are
not installed if you do not have Visual Basic installed as a part of Microsoft
Visual Studio 2005 or Microsoft Visual Basic Express 2005.