Embedding SQL Scripts in Our Project
Learn to embed SQL Scripts for our project's tables and stored procedures.
We'll cover the following
In the previous subsection, we told DbUp to look for SQL Scripts that have been embedded in our project. Now, we are going to embed SQL Scripts for the tables and stored procedures in our project so that DbUp will execute them if they haven’t already been executed when our app loads:
In “Solution Explorer”, right-click the project and choose “Add | New Folder”. Enter “SQLScripts” as the folder name.
Right-click the “SQLScripts” folder and choose “Add | New Item…”
In the dialog box that appears, select the “General” tab and then “Text File” and enter
01-Tables.sql
as the filename:
Get hands-on with 1400+ tech skills courses.