Hi sgray128;
The alternative is to use the command line tool sqlmetal which ships with Visual Studio. To create a data context class with this tool do the following.
- Click on Start | Programs | Microsoft Visual Studio 2008 | Visual Studio Tools | Visual Studio 2008 Command Prompt - Don't use the standard Command prompt.
- Change to the directory you want to create the DataContext class in.
- Execute the following command
sqlmetal /server:ServerName /database:DatabaseName /namespace:NamespaceForTheClass /code:NameForSourceFileDotVbOrCs /pluralize /functions /sprocs /views - In your project - Add existing item and select the class just created in step 3.
- Done
And example of step 3 would look like this:
sqlmetal /server:VIPER /database:Northwind /namespace:Nwind /code:Northwind.vb /pluralize /functions /sprocs /views
/code:Northwind.vb = change vb to cs to get code in C# and not in Visual Basic
/functions - include UDF from the database
/sprocs - include SP from the database
/views - include Views from the database
Fernando