Getting started using Linq, what do I need?

To get up and running, I would definitely recommend checking out LINQ in Action.

alt text

Your compiler needs to be .NET 3.5 framework. If you are copying over only compiled code, then you will not need 3.5 on your server, you only need it on your development machine. This can help if your server admin is unwilling to install the 3.5 framework on your server. However, if you are publishing source code, say to a development server to compile, then yes that server will need 3.5.

Once you have the 3.5 framework installed, you can run web apps either as 2.0 or 3.5. All you have to do is specify it in your Web.Config file.

If you are interested in working with LINQ to SQL and managing dbml files, you will need Visual Studio 2008. However, Visual Studio 2005 will still compile dbml files properly, given that you have the 3.5 framework installed.


You actually only need .net 3.5 on the development machine. If you have 2.0 SP1 on the server, and you set all the .net references in your project of version 3.5.0.0 to "copy local", you can run a 3.5 executable on a 2.0 machine.
makeitlooklikethis http://img90.imageshack.us/img90/4217/35haxxx2.png

As a side note, you may have to delete the yourexecutable.exe.config in order for it to run. For some reason 2.0 sp1 has issues with .configs created by 3.5

I have two live apps running with this setup currently, it works very well.


I would encourage you to check out LinqPad as a learning tool. It's a standalone application that lets you play with Linq queries without worrying about getting it to run on a server.


probably should read Scott Guthries series of articles on LINQ:

Here are links to the various 8 parts. you will need framework 3.5 if I am not mistaken to make this work.

The series with detailed step by step instructions starts here: Part 1

Tags:

C#

.Net

Linq