views:

2781

answers:

3

I normally run VS 2008 at home and LINQ is built in. At work we are still using VS 2005 and I have the opportunity to start a new project that I would like to use LINQ to SQL.

After doing some searching all I could come up with was the MAY 2006 CTP of LINQ would have to be installed for LINQ to work in VS 2005.

Does someone know the proper add ins or updates I would need to install to use LINQ in VS 2005 (preferably without having to use the CTP mentioned above).

A: 

http://aspalliance.com/859

Rob Conery
This uses the May 2006 CTP
Mark Cidade
+1  A: 

You can reference System.Data.Linq.dll and System.Core.dll, and set your build target for C# 3.0 or the latest VB compiler, but everything else would have to be mapped manually (no designer support in VS2005 in LINQ to SQL RTM).

Mark Cidade
+1  A: 

It's no longer legal to use the May CTP (the beta software).

It's not legal to deploy System.Core.dll (among others) without installing .Net 3.5

The best way to do LINQ in VS2005 is to use LINQBridge for LinqToObjects, and to use simple table adapters or some other data access method to punt your data into objects (for further in-memory querying).

Also note: LinqToObjects expects Func(T) - which are essentially delegate types. LinqToSQL requires Expression(Func(T)) - which are expression trees and much harder to construct without the lambda syntax.

David B