How to create element templates for SQL files for Visual Studio Database projects

You can create your own templates for common types of projects, such as templates for C # files, for a class library project.

What about the database project scenario?

I would like to define a standard template for adding a stored procedure that uses company conventions for all stored procedures, such as the standard comments at the top.


After looking at the MSDN article on this topic, it seems that the database project is not supported:

Figure 5 Template Elements for an Element

ProjectType | Specifies the type of project to which this item can be added. Possible values ​​include CSharp, VisualBasic, VisualC, JSharp, and Web.

+3
source share
4 answers

you can create personalized project element templates for the database project, we do this all the time

The item should be placed in the following folder:

C: \ Program Files \ Microsoft Visual Studio 9.0 \ Common7 \ Tools \ Templates \ Database Objects

and then you can select it

+1
source

:

C:\Program Files\Microsoft Visual Studio 10.0\VSTSDB\Extensions\SqlServer\Items

, , .

+1

. , ( / SQL), script " ..."

.

+1

Source: https://habr.com/ru/post/1744074/


All Articles