Embedding SQL Scripts in Our Project

Learn to embed SQL Scripts for our project's tables and stored procedures.

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:

  1. In “Solution Explorer”, right-click the project and choose “Add | New Folder”. Enter “SQLScripts” as the folder name.

  2. Right-click the “SQLScripts” folder and choose “Add | New Item…”

  3. In the dialog box that appears, select the “General” tab and then “Text Fileand enter 01-Tables.sql as the filename:

Get hands-on with 1200+ tech skills courses.