views:

90

answers:

3

In response to one of my previous questions, I was encouraged to check out LINQ to SQL. I like what I see, but I'm struggling to get going with it. I wrote the necessary classes for each database table, but I'm not sure where I'm supposed to put the code. I've been searching the Internet for tutorials, but they all seem to be assuming that Visual Studio 2008 is being used to generate the files. Our company doesn't have Visual Studio 2008 and this is not an appropriate time to be purchasing it, especially since the application works just fine using regular ADO.NET connection and command objects.

Can somebody explain how to get LINQ to SQL up and running manually, or point me to a tutorial that explains it? I'm coding in VB.NET

+2  A: 

You can use SQLMetal from the command line instead of using the IDE. Or you can even use this UI for running SQLMetal.

You could also use Visual Studio Express. The feature set is a bit limited in comparison to the other VS editions, but it still is a very good product and includes support for Linq2SQL. In this case, getting Linq2SQL up and running boils down to creating a new dbml file and dragging some database tables into it.

Adrian Grigore
A: 

You can also use PLINQO to generate your DBML file. It requires CodeSmith (Standard or Professional). This is actually exactly what I use for my DAL. Just an idea to consider.

David Pokluda
+2  A: 

I wouldn't recommend trying to use LINQ without Visual Studio 2008. Without the extra C# 3 language features (not supported in VS2005) you'll have a hard time.

But why not install the Visual Basic Express edition of VS2008 so you can learn about LINQ now and be ready to use it when the rest of the company is happy to buy the full version? VS2005 and VS2008 live happily side by side.

Jon Skeet