Refactoring «Add CRUD Methods»
Introduce stored procedures (methods) to implement the creation, retrieval, update, and deletion (CRUD) of the data representing a business entity.
How to add CRUD methods with SQL Refactor Studio
- Select the table in the Object Explorer.
-
Use Ctrl+Shift+M to invoke the "Add CRUD Methods". Alternatively, you can right click on the selected table in Object Explorer and then use SQL Refactor Studio -> Add CRUD Methods… menu command.
-
In the dialog choose methods you want to add, enter their name (you can modify the default prefix or body of templates in the configurations).
-
Specify roles to grant execute permissions on procedures
-
Press the Finish button to generate the code procedures. Creation scripts will appear in one or more SQL Query window.
NB! Add CRUD Method uses Text Template Transformation Toolkit (T4)
Read more about T4: