views:

136

answers:

3

Is there anyway I can change the namespace of the classes generated by LINQ to SQL

right now it goes ProjectName.FolderName

Is there anyways I can change this default convention

A: 

SQLMetal - Follow this documentation specified. But in essence it looks as follows.

SqlMetal /server:.\SQLExpress /database:Northwind /pluralize /namespace:nwind /code:Northwind.cs
AboutDev
A: 

The LINQ to SQL templates for T4 project on CodePlex might be an option

Eric King
+3  A: 

Open the designer and click on the background, there are two properties called Entity Namespace and Context Namespace, you can use those to set the namespace for the generated classes.

Rory