soldieraman
soldieraman

Reputation: 2688

Change name space of LINQ to SQL generated classes

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

Upvotes: 6

Views: 1664

Answers (3)

Rory
Rory

Reputation: 2742

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.

Upvotes: 8

Eric King
Eric King

Reputation: 11734

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

Upvotes: 0

AboutDev
AboutDev

Reputation: 1923

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

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

Upvotes: 0

Related Questions