简体   繁体   中英

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

打开设计器并单击后台,有两个属性称为Entity NamespaceContext Namespace ,您可以使用它们为生成的类设置命名空间。

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

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

CodePlex上用于T4项目的LINQ to SQL模板可能是一个选项

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM