diff --git a/src/dotnet/.devcontainer/.env b/src/dotnet/.devcontainer/.env deleted file mode 100644 index 39ffd3e..0000000 --- a/src/dotnet/.devcontainer/.env +++ /dev/null @@ -1 +0,0 @@ -MSSQL_SA_PASSWORD=P@ssw0rd! \ No newline at end of file diff --git a/src/dotnet/.devcontainer/Dockerfile b/src/dotnet/.devcontainer/Dockerfile deleted file mode 100644 index a769d83..0000000 --- a/src/dotnet/.devcontainer/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -# [Choice] .NET version: 8.0-bookworm, 8.0-jammy, 8.0-bullseye -FROM mcr.microsoft.com/devcontainers/dotnet:1-${templateOption:imageVariant} - -# Add .NET global tools path -ENV PATH $PATH:/home/vscode/.dotnet:/home/vscode/.dotnet/tools - -# [Optional] Uncomment this section to install additional OS packages. -RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends software-properties-common - -# Install SQL Tools: SQLPackage and sqlcmd -COPY sql/installSQLtools.sh installSQLtools.sh -RUN bash ./installSQLtools.sh \ - && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts \ No newline at end of file diff --git a/src/dotnet/.devcontainer/devcontainer.json b/src/dotnet/.devcontainer/devcontainer.json deleted file mode 100644 index de0816e..0000000 --- a/src/dotnet/.devcontainer/devcontainer.json +++ /dev/null @@ -1,64 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. -// For config options, see the README at: https://github.com/microsoft/azuresql-devcontainers/tree/main/src/dotnet -{ - "name": ".NET and Azure SQL", - "dockerComposeFile": "docker-compose.yml", - "service": "app", - "workspaceFolder": "/workspace", - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Set *default* container specific settings.json values on container create. - "settings": { - "mssql.connections": [ - { - "server": "localhost,1433", - "database": "master", - "authenticationType": "SqlLogin", - "user": "sa", - "password": "${env:MSSQL_SA_PASSWORD}", - "savePassword": true, - "profileName": "LocalDev", - "trustServerCertificate": true - } - ], - "sqlDatabaseProjects.dotnetSDK Location": "/usr/share/dotnet" - }, - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "ms-dotnettools.csdevkit", - "ms-dotnettools.csharp", - "ms-azuretools.vscode-bicep", - "ms-mssql.mssql", - "ms-azuretools.vscode-docker", - "github.copilot", - "github.codespaces" - ] - } - }, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [5000, 5001, 8000, 1433], - - // Post create commands to run after the container is created. - "postCreateCommand": "bash .devcontainer/sql/postCreateCommand.sh 'database/Library/bin/Debug'", - - // Post start commands to run after the container is started. - - // Features to add to the dev container. More info: https://containers.dev/features. - "features": { - "ghcr.io/devcontainers/features/azure-cli:1": { - "installBicep": true, - "installUsingPython": true, - "version": "latest" - }, - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { - "version": "latest" - }, - "ghcr.io/azure/azure-dev/azd:latest": { - "version": "latest" - } - } - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} \ No newline at end of file diff --git a/src/dotnet/.devcontainer/docker-compose.yml b/src/dotnet/.devcontainer/docker-compose.yml deleted file mode 100644 index 487fa37..0000000 --- a/src/dotnet/.devcontainer/docker-compose.yml +++ /dev/null @@ -1,38 +0,0 @@ -version: '3' - -services: - app: - build: - context: . - dockerfile: Dockerfile - - volumes: - - ..:/workspace:cached - - # Overrides default command so things don't shut down after the process ends. - command: sleep infinity - - # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. - network_mode: service:db - # Uncomment the next line to use a non-root user for all processes. - # user: vscode - - # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. - # (Adding the "ports" property to this file will not forward from a Codespace.) - - db: - image: mcr.microsoft.com/azure-sql-edge - hostname: SQL-Library - container_name: SQL-Library - restart: unless-stopped - environment: - ACCEPT_EULA: Y - env_file: - - .env - deploy: - resources: - limits: - cpus: '1' - memory: 2048M - # Add "forwardPorts": ["1433"] to **devcontainer.json** to forward MSSQL locally. - # (Adding the "ports" property to this file will not forward from a Codespace.) \ No newline at end of file diff --git a/src/dotnet/.devcontainer/sql/installSQLtools.sh b/src/dotnet/.devcontainer/sql/installSQLtools.sh deleted file mode 100644 index 1faeb61..0000000 --- a/src/dotnet/.devcontainer/sql/installSQLtools.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -echo "Installing Go-SQLCmd ..." -curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc -sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/prod.list)" -sudo apt-get update -sudo apt-get install -y sqlcmd -echo "Go-SQLCmd installed." - -echo "Installing Sqlpackage ..." -curl -sSL -o sqlpackage.zip "https://aka.ms/sqlpackage-linux" -mkdir -p /opt/sqlpackage -unzip sqlpackage.zip -d /opt/sqlpackage && rm sqlpackage.zip -chmod a+x /opt/sqlpackage/sqlpackage -echo "Sqlpackage installed." \ No newline at end of file diff --git a/src/dotnet/.devcontainer/sql/postCreateCommand.sh b/src/dotnet/.devcontainer/sql/postCreateCommand.sh deleted file mode 100644 index 295221b..0000000 --- a/src/dotnet/.devcontainer/sql/postCreateCommand.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -# Setting variables -dacpac="false" - -# Load SA_PASSWORD from .env file -export $(grep -v '^#' .devcontainer/.env | xargs) -SApassword=$MSSQL_SA_PASSWORD - -# Parameters -dacpath=$1 - -# Extract the project directory from the dacpath -projectDir=$(echo $dacpath | cut -d'/' -f1-2) - -echo "SELECT * FROM SYS.DATABASES" | dd of=testsqlconnection.sql -for i in {1..30}; -do - sqlcmd -S localhost -U sa -P $SApassword -d master -i testsqlconnection.sql > /dev/null - if [ $? -eq 0 ] - then - echo "SQL server ready" - break - else - echo "Not ready yet..." - sleep 1 - fi -done -rm testsqlconnection.sql - -for f in $dacpath/* -do - if [ $f == $dacpath/*".dacpac" ] - then - dacpac="true" - echo "Found dacpac $f" - fi -done - -if [ $dacpac == "true" ] -then - # Build the SQL Database project - echo "Building SQL Database project at $projectDir..." - dotnet build $projectDir - - for f in $dacpath/* - do - if [ $f == $dacpath/*".dacpac" ] - then - dbname=$(basename $f ".dacpac") - # Deploy the dacpac - echo "Deploying dacpac $f" - /opt/sqlpackage/sqlpackage /Action:Publish /SourceFile:$f /TargetServerName:localhost /TargetDatabaseName:$dbname /TargetUser:sa /TargetPassword:$SApassword /TargetTrustServerCertificate:True - fi - done -fi \ No newline at end of file diff --git a/src/dotnet/.gitattributes b/src/dotnet/.gitattributes deleted file mode 100644 index 5b5f7ed..0000000 --- a/src/dotnet/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -# Git will always convert line endings to LF on checkout. -# Used for files that must keep LF endings, even on Windows. -*.sh text eol=lf \ No newline at end of file diff --git a/src/dotnet/.vscode/tasks.json b/src/dotnet/.vscode/tasks.json deleted file mode 100644 index 335d79b..0000000 --- a/src/dotnet/.vscode/tasks.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "label": "1. Verify database schema and data", - "type": "shell", - "command": "code", - "args": [ - "--goto", - "${workspaceFolder}/scripts/verifyDatabase.sql" - ], - "presentation": { - "reveal": "always", - "panel": "new" - } - }, - { - "label": "2. Build SQL Database project", - "type": "shell", - "command": "dotnet build", - "options": { - "cwd": "${workspaceFolder}/database/Library" - } - }, - { - "label": "3. Publish SQL Database project", - "type": "shell", - "command": "bash", - "args": [ - ".devcontainer/sql/postCreateCommand.sh", - "database/Library/bin/Debug" - ] - }, - { - "label": "4. Trust .NET HTTPS certificate", - "type": "shell", - "command": "dotnet dev-certs https --trust" - } - ] -} \ No newline at end of file diff --git a/src/dotnet/NOTES.md b/src/dotnet/NOTES.md deleted file mode 100644 index 0769b78..0000000 --- a/src/dotnet/NOTES.md +++ /dev/null @@ -1,232 +0,0 @@ - -This dev container template enables you to effortlessly explore **.NET** and **Azure SQL**. In just a few simple steps, you can dive into the capabilities of these powerful technologies. - -A **development container** (dev container for short) essentially packages up your project's development environment using the Development Container Specification. This specification enriches your container with metadata and content necessary to enable development from inside a container. - - You can try out dev containers with **[GitHub Codespaces](https://github.com/features/codespaces)** or **[Visual Studio Code Dev Containers](https://aka.ms/vscode-remote/containers)**. - -To learn more details about all the Azure SQL Database templates, you can explore the template repository at [aka.ms/azuresql-devcontainers-repo](https://aka.ms/azuresql-devcontainers-repo). This repository includes comprehensive information for each Azure SQL template. To learn more about Dev Containers, visit [containers.dev](https://containers.dev/) website, where you find a diverse range of templates. - -> [!NOTE] -> If you already have a VS Code Dev Container or a GitHub Codespace, you can jump to the [About this template](#about-this-template) section. - -## Setting up the development container - -### Visual Studio Code - -Follow these steps to open this sample in a container using the VS Code Dev Containers extension: - -1. If you're using a dev container for the first time, ensure your system meets the prerequisites in the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started). -2. To use this repository, you can either open the repository in an isolated Docker volume: - - Press `F1` or `Ctrl+Shift+P` to open the command palette. - - Select the **Dev Containers: New Dev Container** command. - - Select the desired dev container template for Azure SQL Database, typing **Azure SQL**. - - Select the **.NET and Azure SQL (dotnet)** template - - Wait for the container to build. - - Visual Studio Code builds the container based on the selected configuration. - - The build process might take a few minutes the first time. - - Subsequent builds are faster. - - Once the container is built, the repository opens in the dev container. - -For more information, see the [Dev Containers tutorial](https://code.visualstudio.com/docs/devcontainers/tutorial). - -> [!NOTE] -> Under the hood, this will use the **Dev Containers: Clone Repository in Container Volume...** command to clone the source code in a Docker volume instead of the local filesystem. [Volumes](https://docs.docker.com/storage/volumes/) are the preferred mechanism for persisting container data. - -### GitHub Codespaces - -To set up and use a dev container with GitHub Codespaces, follow these steps: - -1. **Prerequisites** - - Ensure you have access to GitHub Codespaces. - - Ensure your repository is hosted on GitHub. - -2. **Create or Open a Codespace** - - Navigate to your repository on GitHub. - - Click on the **Code** button, then select **Codespaces**. - - Click **New codespace** to create a new one or **...** next to an existing codespace to open it. - -3. **Set Up the Development Container** - - Once your codespace is running, open the command palette by pressing `F1` or `Ctrl+Shift+P`. - - Type and select **Dev Containers: Add Development Container Configuration Files...**. - - From the list, select **Show All Definitions...**. - - Type **Azure SQL** to filter the list. - - Select the **.NET and Azure SQL (dotnet)** template. - - The selected template will be added to your repository, creating a `.devcontainer` folder with configuration files. - -4. **Rebuild the Codespace** - - To apply the new configuration, you need to rebuild the codespace. - - Open the command palette by pressing `F1` or `Ctrl+Shift+P` again. - - Type and select **Codespaces: Rebuild Container**. - - Wait for the container to rebuild. This might take a few minutes the first time as it pulls and sets up the necessary images and configurations. - -5. **Using the Dev Container** - - Once the container is built, your codespace will restart in the new development environment. - - You can now start exploring and developing with the preconfigured .NET and Azure SQL setup. - -> [!NOTE] -> The `.devcontainer` folder includes configuration files like `devcontainer.json`, `docker-compose.yml`, and supporting scripts for setting up and managing the development environment. - -### About this template - -This Dev Container includes a preconfigured database, specifically tailored for use with .NET 8. This database serves as a foundation for demonstrating how .NET interacts with Azure SQL. - -This template creates two containers: one for the container that includes .NET 8, and one for the database. You will be connected to the Ubuntu environment, and from within that container, the database container will be available on **`localhost`** port 1433. The dev container also includes a set of VS Code tasks that can help you to verify the database schema and data, as well as build and publish the database project to the database container. - -The database container (SQL-Library) is deployed from the latest developer edition of Azure SQL Edge. The database(s) are made available directly in VS Code through the MSSQL extension with a connection labeled **LocalDev**. The default `sa` user password is set using the `.devcontainer/.env` file. The default SQL port is mapped to port `1433` in `.devcontainer/docker-compose.yml`. - -.NET 8 is a state-of-the-art framework for developing cloud-native applications, with a focus on containerized environments. Built on .NET Core, .NET 8 offers advanced features for creating scalable, performant, and resilient applications. Improved performance, support for microservices, and robust tools make .NET 8 ideal for modern cloud development. - -> [!IMPORTANT] -> While the database container employs a development version of Azure SQL Edge , all database development within this dev container can be validated for Azure SQL Database using the SQL Database Project. The SQL Database project is preconfigured with the target platform set as Azure SQL Database. -> -> To learn more about the SQL Database Projects extension, visit the [Getting started with the SQL Database Projects extension](/azure-data-studio/extensions/sql-database-project-extension-getting-started). - -### Preconfigured Environment - -All of the below tools and utilities are pre-loaded in the dev container. You don't need to download or install! - -- **.NET** : The environment includes your preferred programming language/framework preinstalled and configured, ready for development. -- **Azure CLI**: Tools for managing Azure resources and deployments. -- **Azure Developer CLI**: A command-line interface providing a unified scripting experience for managing and developing Azure resources. -- **Docker CLI**: Allows building and managing Docker containers from within another container. -- **Azure SQL Database**: The `library` database was created, validated, and is ready for use. This database gives you full compatibility with Azure SQL Database. -- **SQLCMD**: A command-line utility you can use to interact with the database, run queries, and more. -- **SqlPackage**: Command-line utility for deploying database changes, including schema updates and data migrations. - -### Visual Studio Code Extensions - -- `ms-mssql.mssql`: SQL Server extension for connecting and querying SQL databases. -- `ms-mssql.sql-database-projects`: Extension for managing SQL Database projects, allowing for streamlined schema changes and deployment. -- `github.copilot`: AI-powered code completion for enhanced productivity. -- `ms-azuretools.vscode-docker`: Docker extension for managing containers directly from Visual Studio Code. -- `github.codespaces`: Extension for working with GitHub Codespaces. -- `ms-azuretools.vscode-docker`: Docker extension for managing containers. - -> [!TIP] -> There will be more extensions available depending on the template you choose. You can install additional extensions by opening the Extensions view in Visual Studio Code and searching for the desired extension. - -#### Visual Studio Code Tasks - -This dev container template includes multiple tasks that can help with common actions. You can access these tasks by opening the Command Palette in VS Code. Here's how: - -1. To open the Command Palette, press F1 or Ctrl+Shift+P. Type **Run Task** and select **Tasks: Run Task**. -![Run VS Code task](./images/vscode-azure-sql-devcontainers-tasks.png) -1. Choose one of the tasks you want to run from the built-in list included in this Dev Container template. -![VS Code task list](./images/vscode-azure-sql-devcontainers-task-list-dotnet.png) - -##### 1. Verify database schema and data - -This task is optional, however it can help you to become familiar with the sample `Library` database tables and data included in this dev container template. - -From the built-in tasks included in this dev container template, select `1. Verify database schema and data` to run this task. -![VS Code task list](./images/vscode-azure-sql-devcontainers-task-list-dotnet.png) - -Select `Continue without scanning the task output` when prompted. -![Run VS Code task - Continue](./images/vscode-azure-sql-devcontainers-task-continue.png) - -The task opens the `verifyDatabase.sql` file in your workspace and leaves the same ready to be executed using the `ms-mssql.mssql` extension. Then, select the "Run" button or press `F5` to execute the script. -![Run VS Code task - Run SQL Script](./images/vscode-azure-sql-devcontainers-task-sql-run.png) - -Select the built-in connection **LocalDev** to connect to the database and execute the script. -![Run VS Code task - SQL connection profile](./images/vscode-azure-sql-devcontainers-task-sql-profile.png) - -The results of the SQL script will be displayed in the output window. -![Run VS Code task - SQL script results](./images/vscode-azure-sql-devcontainers-task-sql-results.png) - -##### 2. Build SQL Database project - -This task is optional, but it's useful to verify the database schema. You can use this SQL Database project to make changes to the database schema and deploy it to the SQL Server container. - -From the built-in tasks, select `2. Build SQL Database project` to run this task. -![VS Code task list](./images/vscode-azure-sql-devcontainers-task-list-dotnet.png) - -Select `Continue without scanning the task output` when prompted. -![Run VS Code task - Continue](./images/vscode-azure-sql-devcontainers-task-continue.png) - -This task builds the SQL Database project. It runs the command `dotnet build` in the `database/Library` directory of your workspace. -![Run VS Code task - SQL Database project build](./images/vscode-azure-sql-devcontainers-task-project-build.png) - -##### 3. Publish SQL Database project - -From the built-in tasks, select `3. Publish SQL Database project` to run this task. -![VS Code task list](./images/vscode-azure-sql-devcontainers-task-list-dotnet.png) - -Select `Continue without scanning the task output` when prompted. -![Run VS Code task - Continue](./images/vscode-azure-sql-devcontainers-task-continue.png) - -This task involves deploying the SQL Database project to your SQL Server container. It executes the `postCreateCommand.sh` script found in the `.devcontainer/sql` directory of your workspace. - -The `postCreateCommand.sh` script requires one argument: the path to the directory containing the .dacpac file for the SQL Database project. In this scenario, that directory is `database/Library/bin/Debug`. - -It utilizes the `SqlPackage` command-line utility to update the database schema using the .dacpac file, employing authentication credentials from the `.devcontainer/.env` file. -![Run VS Code task - SQL Database project publish](./images/vscode-azure-sql-devcontainers-task-project-publish.png) - -##### 4. Trust HTTPS certificate for .NET - -From the built-in tasks included in this dev container template, select `5. Trust HTTPS certificate for .NET` to run this task. -![VS Code task list](./images/vscode-azure-sql-devcontainers-task-list-dotnet.png) - -Select `Continue without scanning the task output` when prompted. -![Run VS Code task - Continue](./images/vscode-azure-sql-devcontainers-task-continue.png) - -This task is optional, however it can be helpful to trusts the local HTTPS certificate for your .NET Aspire project. This task runs the command `dotnet dev-certs https --trust`. -![VS Code task - .NET HTTPS certificate](./images/vscode-azure-sql-devcontainers-task-dotnet-cert.png) - -### Changing the sa password - -To adjust the sa password, you need to modify the `.env` file located within the `.devcontainer` directory. This password is crucial for the creation of the SQL Server container and the deployment of the Library database using the `database/Library/bin/Debug/Library.dacpac` file. - -The password must comply with the following rules: - -- It should have a minimum length of eight characters. -- It should include characters from at least three of the following categories: uppercase letters, lowercase letters, numbers, and nonalphanumeric symbols. - -### Database deployment - -By default, a demo database titled `Library` is created using a dacpac file. The deployment process is automated through the `postCreateCommand.sh` script, which is specified in the `devcontainer.json' configuration: - -```json -"postCreateCommand": "bash .devcontainer/sql/postCreateCommand.sh 'database/Library/bin/Debug'" -``` - -#### Automated Database Deployment - -The `postCreateCommand.sh` script handles the database deployment by performing the following steps: - -1. Loads the `SA_PASSWORD` from the `.devcontainer/.env` file. -1. Waits for the SQL Server to be ready by attempting to connect multiple times. -1. Checks for .dacpac files in the specified directory (`database/Library/bin/Debug`). -1. Deploys each .dacpac file found to the database. - -#### Using the SQL Database Projects Extension - -To modify the database schema, utilize the SQL Database Projects extension. This allows you to build and publish changes directly from VS Code to your local database included in this development environment. Use the pre-built VS Code tasks for building (`2. Build SQL Database project`) and publishing (`3. Publish SQL Database project`). The build process will update the `.dacpac` file and the project definition, which is located in the `./bin/Debug` folder. - -> [!TIP] -> With this demo project, you can easily use the dacpac artifact created by SQL Database Projects and deploy it to Azure SQL Database using the Azure SQL Action for GitHub Actions. This process streamlines your workflow and ensures seamless integration with your production environment. - -To learn more about the SQL Database Projects extension, visit the [Getting started with the SQL Database Projects extension](/azure-data-studio/extensions/sql-database-project-extension-getting-started). - -### Adding another service - -You can add other services to your `.devcontainer/docker-compose.yml` file [as described in Docker's documentation](https://docs.docker.com/compose/compose-file/#service-configuration-reference). However, if you want anything running in this service to be available in the container on localhost, or want to forward the service locally, be sure to add this line to the service config: - -```yaml -# Runs the service on the same network as the database container, allows "forwardPorts" in devcontainer.json function. -network_mode: service:db -``` - -### Using the forwardPorts property - -By default, web frameworks and tools often only listen to localhost inside the container. As a result, we recommend using the `forwardPorts` property to make these ports available locally. - -This project uses the `5000` and `5001` ports for .NET, and the port `1433` for SQL Server: - -```json -"forwardPorts": [5000, 5001, 1433] -``` -> **Note:** -> You can add additional ports to this list as needed. - -The `ports` property in `docker-compose.yml` [publishes](https://docs.docker.com/config/containers/container-networking/#published-ports) rather than forwards the port. This configuration couldn't work in a cloud environment like Codespaces and applications need to listen to `*` or `0.0.0.0` for the application to be accessible externally. Fortunately the `forwardPorts` property doesn't have this limitation. \ No newline at end of file diff --git a/src/dotnet/README.md b/src/dotnet/README.md deleted file mode 100644 index 0d992bd..0000000 --- a/src/dotnet/README.md +++ /dev/null @@ -1,247 +0,0 @@ - -# .NET and Azure SQL (dotnet) - -A development environment for .NET and Azure SQL, enabling streamlined local development and testing. - -## Options - -| Options Id | Description | Type | Default Value | -|-----|-----|-----|-----| -| imageVariant | .NET version: | string | 8.0-bookworm | - - -This dev container template enables you to effortlessly explore **.NET** and **Azure SQL**. In just a few simple steps, you can dive into the capabilities of these powerful technologies. - -A **development container** (dev container for short) essentially packages up your project's development environment using the Development Container Specification. This specification enriches your container with metadata and content necessary to enable development from inside a container. - - You can try out dev containers with **[GitHub Codespaces](https://github.com/features/codespaces)** or **[Visual Studio Code Dev Containers](https://aka.ms/vscode-remote/containers)**. - -To learn more details about all the Azure SQL Database templates, you can explore the template repository at [aka.ms/azuresql-devcontainers-repo](https://aka.ms/azuresql-devcontainers-repo). This repository includes comprehensive information for each Azure SQL template. To learn more about Dev Containers, visit [containers.dev](https://containers.dev/) website, where you find a diverse range of templates. - -> [!NOTE] -> If you already have a VS Code Dev Container or a GitHub Codespace, you can jump to the [About this template](#about-this-template) section. - -## Setting up the development container - -### Visual Studio Code - -Follow these steps to open this sample in a container using the VS Code Dev Containers extension: - -1. If you're using a dev container for the first time, ensure your system meets the prerequisites in the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started). -2. To use this repository, you can either open the repository in an isolated Docker volume: - - Press `F1` or `Ctrl+Shift+P` to open the command palette. - - Select the **Dev Containers: New Dev Container** command. - - Select the desired dev container template for Azure SQL Database, typing **Azure SQL**. - - Select the **.NET and Azure SQL (dotnet)** template - - Wait for the container to build. - - Visual Studio Code builds the container based on the selected configuration. - - The build process might take a few minutes the first time. - - Subsequent builds are faster. - - Once the container is built, the repository opens in the dev container. - -For more information, see the [Dev Containers tutorial](https://code.visualstudio.com/docs/devcontainers/tutorial). - -> [!NOTE] -> Under the hood, this will use the **Dev Containers: Clone Repository in Container Volume...** command to clone the source code in a Docker volume instead of the local filesystem. [Volumes](https://docs.docker.com/storage/volumes/) are the preferred mechanism for persisting container data. - -### GitHub Codespaces - -To set up and use a dev container with GitHub Codespaces, follow these steps: - -1. **Prerequisites** - - Ensure you have access to GitHub Codespaces. - - Ensure your repository is hosted on GitHub. - -2. **Create or Open a Codespace** - - Navigate to your repository on GitHub. - - Click on the **Code** button, then select **Codespaces**. - - Click **New codespace** to create a new one or **...** next to an existing codespace to open it. - -3. **Set Up the Development Container** - - Once your codespace is running, open the command palette by pressing `F1` or `Ctrl+Shift+P`. - - Type and select **Dev Containers: Add Development Container Configuration Files...**. - - From the list, select **Show All Definitions...**. - - Type **Azure SQL** to filter the list. - - Select the **.NET and Azure SQL (dotnet)** template. - - The selected template will be added to your repository, creating a `.devcontainer` folder with configuration files. - -4. **Rebuild the Codespace** - - To apply the new configuration, you need to rebuild the codespace. - - Open the command palette by pressing `F1` or `Ctrl+Shift+P` again. - - Type and select **Codespaces: Rebuild Container**. - - Wait for the container to rebuild. This might take a few minutes the first time as it pulls and sets up the necessary images and configurations. - -5. **Using the Dev Container** - - Once the container is built, your codespace will restart in the new development environment. - - You can now start exploring and developing with the preconfigured .NET and Azure SQL setup. - -> [!NOTE] -> The `.devcontainer` folder includes configuration files like `devcontainer.json`, `docker-compose.yml`, and supporting scripts for setting up and managing the development environment. - -### About this template - -This Dev Container includes a preconfigured database, specifically tailored for use with .NET 8. This database serves as a foundation for demonstrating how .NET interacts with Azure SQL. - -This template creates two containers: one for the container that includes .NET 8, and one for the database. You will be connected to the Ubuntu environment, and from within that container, the database container will be available on **`localhost`** port 1433. The dev container also includes a set of VS Code tasks that can help you to verify the database schema and data, as well as build and publish the database project to the database container. - -The database container (SQL-Library) is deployed from the latest developer edition of Azure SQL Edge. The database(s) are made available directly in VS Code through the MSSQL extension with a connection labeled **LocalDev**. The default `sa` user password is set using the `.devcontainer/.env` file. The default SQL port is mapped to port `1433` in `.devcontainer/docker-compose.yml`. - -.NET 8 is a state-of-the-art framework for developing cloud-native applications, with a focus on containerized environments. Built on .NET Core, .NET 8 offers advanced features for creating scalable, performant, and resilient applications. Improved performance, support for microservices, and robust tools make .NET 8 ideal for modern cloud development. - -> [!IMPORTANT] -> While the database container employs a development version of Azure SQL Edge , all database development within this dev container can be validated for Azure SQL Database using the SQL Database Project. The SQL Database project is preconfigured with the target platform set as Azure SQL Database. -> -> To learn more about the SQL Database Projects extension, visit the [Getting started with the SQL Database Projects extension](/azure-data-studio/extensions/sql-database-project-extension-getting-started). - -### Preconfigured Environment - -All of the below tools and utilities are pre-loaded in the dev container. You don't need to download or install! - -- **.NET** : The environment includes your preferred programming language/framework preinstalled and configured, ready for development. -- **Azure CLI**: Tools for managing Azure resources and deployments. -- **Azure Developer CLI**: A command-line interface providing a unified scripting experience for managing and developing Azure resources. -- **Docker CLI**: Allows building and managing Docker containers from within another container. -- **Azure SQL Database**: The `library` database was created, validated, and is ready for use. This database gives you full compatibility with Azure SQL Database. -- **SQLCMD**: A command-line utility you can use to interact with the database, run queries, and more. -- **SqlPackage**: Command-line utility for deploying database changes, including schema updates and data migrations. - -### Visual Studio Code Extensions - -- `ms-mssql.mssql`: SQL Server extension for connecting and querying SQL databases. -- `ms-mssql.sql-database-projects`: Extension for managing SQL Database projects, allowing for streamlined schema changes and deployment. -- `github.copilot`: AI-powered code completion for enhanced productivity. -- `ms-azuretools.vscode-docker`: Docker extension for managing containers directly from Visual Studio Code. -- `github.codespaces`: Extension for working with GitHub Codespaces. -- `ms-azuretools.vscode-docker`: Docker extension for managing containers. - -> [!TIP] -> There will be more extensions available depending on the template you choose. You can install additional extensions by opening the Extensions view in Visual Studio Code and searching for the desired extension. - -#### Visual Studio Code Tasks - -This dev container template includes multiple tasks that can help with common actions. You can access these tasks by opening the Command Palette in VS Code. Here's how: - -1. To open the Command Palette, press F1 or Ctrl+Shift+P. Type **Run Task** and select **Tasks: Run Task**. -![Run VS Code task](./images/vscode-azure-sql-devcontainers-tasks.png) -1. Choose one of the tasks you want to run from the built-in list included in this Dev Container template. -![VS Code task list](./images/vscode-azure-sql-devcontainers-task-list-dotnet.png) - -##### 1. Verify database schema and data - -This task is optional, however it can help you to become familiar with the sample `Library` database tables and data included in this dev container template. - -From the built-in tasks included in this dev container template, select `1. Verify database schema and data` to run this task. -![VS Code task list](./images/vscode-azure-sql-devcontainers-task-list-dotnet.png) - -Select `Continue without scanning the task output` when prompted. -![Run VS Code task - Continue](./images/vscode-azure-sql-devcontainers-task-continue.png) - -The task opens the `verifyDatabase.sql` file in your workspace and leaves the same ready to be executed using the `ms-mssql.mssql` extension. Then, select the "Run" button or press `F5` to execute the script. -![Run VS Code task - Run SQL Script](./images/vscode-azure-sql-devcontainers-task-sql-run.png) - -Select the built-in connection **LocalDev** to connect to the database and execute the script. -![Run VS Code task - SQL connection profile](./images/vscode-azure-sql-devcontainers-task-sql-profile.png) - -The results of the SQL script will be displayed in the output window. -![Run VS Code task - SQL script results](./images/vscode-azure-sql-devcontainers-task-sql-results.png) - -##### 2. Build SQL Database project - -This task is optional, but it's useful to verify the database schema. You can use this SQL Database project to make changes to the database schema and deploy it to the SQL Server container. - -From the built-in tasks, select `2. Build SQL Database project` to run this task. -![VS Code task list](./images/vscode-azure-sql-devcontainers-task-list-dotnet.png) - -Select `Continue without scanning the task output` when prompted. -![Run VS Code task - Continue](./images/vscode-azure-sql-devcontainers-task-continue.png) - -This task builds the SQL Database project. It runs the command `dotnet build` in the `database/Library` directory of your workspace. -![Run VS Code task - SQL Database project build](./images/vscode-azure-sql-devcontainers-task-project-build.png) - -##### 3. Publish SQL Database project - -From the built-in tasks, select `3. Publish SQL Database project` to run this task. -![VS Code task list](./images/vscode-azure-sql-devcontainers-task-list-dotnet.png) - -Select `Continue without scanning the task output` when prompted. -![Run VS Code task - Continue](./images/vscode-azure-sql-devcontainers-task-continue.png) - -This task involves deploying the SQL Database project to your SQL Server container. It executes the `postCreateCommand.sh` script found in the `.devcontainer/sql` directory of your workspace. - -The `postCreateCommand.sh` script requires one argument: the path to the directory containing the .dacpac file for the SQL Database project. In this scenario, that directory is `database/Library/bin/Debug`. - -It utilizes the `SqlPackage` command-line utility to update the database schema using the .dacpac file, employing authentication credentials from the `.devcontainer/.env` file. -![Run VS Code task - SQL Database project publish](./images/vscode-azure-sql-devcontainers-task-project-publish.png) - -##### 4. Trust HTTPS certificate for .NET - -From the built-in tasks included in this dev container template, select `5. Trust HTTPS certificate for .NET` to run this task. -![VS Code task list](./images/vscode-azure-sql-devcontainers-task-list-dotnet.png) - -Select `Continue without scanning the task output` when prompted. -![Run VS Code task - Continue](./images/vscode-azure-sql-devcontainers-task-continue.png) - -This task is optional, however it can be helpful to trusts the local HTTPS certificate for your .NET Aspire project. This task runs the command `dotnet dev-certs https --trust`. -![VS Code task - .NET HTTPS certificate](./images/vscode-azure-sql-devcontainers-task-dotnet-cert.png) - -### Changing the sa password - -To adjust the sa password, you need to modify the `.env` file located within the `.devcontainer` directory. This password is crucial for the creation of the SQL Server container and the deployment of the Library database using the `database/Library/bin/Debug/Library.dacpac` file. - -The password must comply with the following rules: - -- It should have a minimum length of eight characters. -- It should include characters from at least three of the following categories: uppercase letters, lowercase letters, numbers, and nonalphanumeric symbols. - -### Database deployment - -By default, a demo database titled `Library` is created using a dacpac file. The deployment process is automated through the `postCreateCommand.sh` script, which is specified in the `devcontainer.json' configuration: - -```json -"postCreateCommand": "bash .devcontainer/sql/postCreateCommand.sh 'database/Library/bin/Debug'" -``` - -#### Automated Database Deployment - -The `postCreateCommand.sh` script handles the database deployment by performing the following steps: - -1. Loads the `SA_PASSWORD` from the `.devcontainer/.env` file. -1. Waits for the SQL Server to be ready by attempting to connect multiple times. -1. Checks for .dacpac files in the specified directory (`database/Library/bin/Debug`). -1. Deploys each .dacpac file found to the database. - -#### Using the SQL Database Projects Extension - -To modify the database schema, utilize the SQL Database Projects extension. This allows you to build and publish changes directly from VS Code to your local database included in this development environment. Use the pre-built VS Code tasks for building (`2. Build SQL Database project`) and publishing (`3. Publish SQL Database project`). The build process will update the `.dacpac` file and the project definition, which is located in the `./bin/Debug` folder. - -> [!TIP] -> With this demo project, you can easily use the dacpac artifact created by SQL Database Projects and deploy it to Azure SQL Database using the Azure SQL Action for GitHub Actions. This process streamlines your workflow and ensures seamless integration with your production environment. - -To learn more about the SQL Database Projects extension, visit the [Getting started with the SQL Database Projects extension](/azure-data-studio/extensions/sql-database-project-extension-getting-started). - -### Adding another service - -You can add other services to your `.devcontainer/docker-compose.yml` file [as described in Docker's documentation](https://docs.docker.com/compose/compose-file/#service-configuration-reference). However, if you want anything running in this service to be available in the container on localhost, or want to forward the service locally, be sure to add this line to the service config: - -```yaml -# Runs the service on the same network as the database container, allows "forwardPorts" in devcontainer.json function. -network_mode: service:db -``` - -### Using the forwardPorts property - -By default, web frameworks and tools often only listen to localhost inside the container. As a result, we recommend using the `forwardPorts` property to make these ports available locally. - -This project uses the `5000` and `5001` ports for .NET, and the port `1433` for SQL Server: - -```json -"forwardPorts": [5000, 5001, 1433] -``` -> **Note:** -> You can add additional ports to this list as needed. - -The `ports` property in `docker-compose.yml` [publishes](https://docs.docker.com/config/containers/container-networking/#published-ports) rather than forwards the port. This configuration couldn't work in a cloud environment like Codespaces and applications need to listen to `*` or `0.0.0.0` for the application to be accessible externally. Fortunately the `forwardPorts` property doesn't have this limitation. - ---- - -_Note: This file was auto-generated from the [devcontainer-template.json](https://github.com/microsoft/azuresql-devcontainers/blob/main/src/dotnet/devcontainer-template.json). Add additional notes to a `NOTES.md`._ diff --git a/src/dotnet/database/Library/Library.sqlproj b/src/dotnet/database/Library/Library.sqlproj deleted file mode 100644 index 5687c61..0000000 --- a/src/dotnet/database/Library/Library.sqlproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Library - {478C0943-4ABE-4FFA-8797-721915EB2B70} - Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider - 1033, CI - - - - - - - - \ No newline at end of file diff --git a/src/dotnet/database/Library/Sequences/globalId.sql b/src/dotnet/database/Library/Sequences/globalId.sql deleted file mode 100644 index bc22f85..0000000 --- a/src/dotnet/database/Library/Sequences/globalId.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE SEQUENCE [dbo].[globalId] - AS INT - START WITH 1000000 - INCREMENT BY 1; - - -GO - diff --git a/src/dotnet/database/Library/StoredProcedures/stp_get_all_cowritten_books_by_author.sql b/src/dotnet/database/Library/StoredProcedures/stp_get_all_cowritten_books_by_author.sql deleted file mode 100644 index 0c55d72..0000000 --- a/src/dotnet/database/Library/StoredProcedures/stp_get_all_cowritten_books_by_author.sql +++ /dev/null @@ -1,55 +0,0 @@ - -create procedure dbo.stp_get_all_cowritten_books_by_author - @author nvarchar(100), - @searchType char(1) = 'c' -as - -declare @authorSearchString nvarchar(110); - -if @searchType = 'c' - set @authorSearchString = '%' + @author + '%' -- contains -else if @searchType = 's' - set @authorSearchString = @author + '%' -- startswith -else - throw 50000, '@searchType must be set to "c" or "s"', 16; - -with - aggregated_authors - as - ( - select - ba.book_id, - string_agg(concat(a.first_name, ' ', (a.middle_name + ' '), a.last_name), ', ') as authors, - author_count = count(*) - from - dbo.books_authors ba - inner join - dbo.authors a on ba.author_id = a.id - group by - ba.book_id - ) -select - b.id, - b.title, - b.pages, - b.[year], - aa.authors -from - dbo.books b - inner join - aggregated_authors aa on b.id = aa.book_id - inner join - dbo.books_authors ba on b.id = ba.book_id - inner join - dbo.authors a on a.id = ba.author_id -where - aa.author_count > 1 - and - ( - concat(a.first_name, ' ', (a.middle_name + ' '), a.last_name) like @authorSearchString - or - concat(a.first_name, ' ', a.last_name) like @authorSearchString -); - -GO - diff --git a/src/dotnet/database/Library/Tables/authors.sql b/src/dotnet/database/Library/Tables/authors.sql deleted file mode 100644 index 612e2c3..0000000 --- a/src/dotnet/database/Library/Tables/authors.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE [dbo].[authors] ( - [id] INT DEFAULT (NEXT VALUE FOR [dbo].[globalId]) NOT NULL, - [first_name] NVARCHAR (100) NOT NULL, - [middle_name] NVARCHAR (100) NULL, - [last_name] NVARCHAR (100) NOT NULL, - PRIMARY KEY CLUSTERED ([id] ASC) -); - - -GO - diff --git a/src/dotnet/database/Library/Tables/books.sql b/src/dotnet/database/Library/Tables/books.sql deleted file mode 100644 index d8cfe07..0000000 --- a/src/dotnet/database/Library/Tables/books.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE [dbo].[books] ( - [id] INT DEFAULT (NEXT VALUE FOR [dbo].[globalId]) NOT NULL, - [title] NVARCHAR (1000) NOT NULL, - [year] INT NULL, - [pages] INT NULL, - PRIMARY KEY CLUSTERED ([id] ASC) -); - - -GO - diff --git a/src/dotnet/database/Library/Tables/books_authors.sql b/src/dotnet/database/Library/Tables/books_authors.sql deleted file mode 100644 index a413147..0000000 --- a/src/dotnet/database/Library/Tables/books_authors.sql +++ /dev/null @@ -1,17 +0,0 @@ -CREATE TABLE [dbo].[books_authors] ( - [author_id] INT NOT NULL, - [book_id] INT NOT NULL, - PRIMARY KEY CLUSTERED ([author_id] ASC, [book_id] ASC), - FOREIGN KEY ([author_id]) REFERENCES [dbo].[authors] ([id]), - FOREIGN KEY ([book_id]) REFERENCES [dbo].[books] ([id]) -); - - -GO - -CREATE NONCLUSTERED INDEX [ixnc1] - ON [dbo].[books_authors]([book_id] ASC, [author_id] ASC); - - -GO - diff --git a/src/dotnet/database/Library/Views/vw_books_details.sql b/src/dotnet/database/Library/Views/vw_books_details.sql deleted file mode 100644 index 06b5773..0000000 --- a/src/dotnet/database/Library/Views/vw_books_details.sql +++ /dev/null @@ -1,30 +0,0 @@ - -create view dbo.vw_books_details -as - with - aggregated_authors - as - ( - select - ba.book_id, - string_agg(concat(a.first_name, ' ', (a.middle_name + ' '), a.last_name), ', ') as authors - from - dbo.books_authors ba - inner join - dbo.authors a on ba.author_id = a.id - group by - ba.book_id - ) - select - b.id, - b.title, - b.pages, - b.[year], - aa.authors - from - dbo.books b - inner join - aggregated_authors aa on b.id = aa.book_id - -GO - diff --git a/src/dotnet/database/Library/bin/Debug/Library.dacpac b/src/dotnet/database/Library/bin/Debug/Library.dacpac deleted file mode 100644 index 46af692..0000000 Binary files a/src/dotnet/database/Library/bin/Debug/Library.dacpac and /dev/null differ diff --git a/src/dotnet/database/Library/bin/Debug/Library.dll b/src/dotnet/database/Library/bin/Debug/Library.dll deleted file mode 100644 index 6aca681..0000000 Binary files a/src/dotnet/database/Library/bin/Debug/Library.dll and /dev/null differ diff --git a/src/dotnet/database/Library/bin/Debug/Library.pdb b/src/dotnet/database/Library/bin/Debug/Library.pdb deleted file mode 100644 index 32adda8..0000000 Binary files a/src/dotnet/database/Library/bin/Debug/Library.pdb and /dev/null differ diff --git a/src/dotnet/database/Library/obj/Debug/Library.dll b/src/dotnet/database/Library/obj/Debug/Library.dll deleted file mode 100644 index 6aca681..0000000 Binary files a/src/dotnet/database/Library/obj/Debug/Library.dll and /dev/null differ diff --git a/src/dotnet/database/Library/obj/Debug/Library.pdb b/src/dotnet/database/Library/obj/Debug/Library.pdb deleted file mode 100644 index 32adda8..0000000 Binary files a/src/dotnet/database/Library/obj/Debug/Library.pdb and /dev/null differ diff --git a/src/dotnet/database/Library/obj/Debug/Library.sqlproj.FileListAbsolute.txt b/src/dotnet/database/Library/obj/Debug/Library.sqlproj.FileListAbsolute.txt deleted file mode 100644 index 53e9b70..0000000 --- a/src/dotnet/database/Library/obj/Debug/Library.sqlproj.FileListAbsolute.txt +++ /dev/null @@ -1,9 +0,0 @@ -/workspaces/azuresql-devcontainers/src/dotnet/database/Library/bin/Debug/Library.dacpac -/workspaces/azuresql-devcontainers/src/dotnet/database/Library/bin/Debug/Library.dll -/workspaces/azuresql-devcontainers/src/dotnet/database/Library/bin/Debug/Library.pdb -/workspaces/azuresql-devcontainers/src/dotnet/database/Library/obj/Debug/Model.xml -/workspaces/azuresql-devcontainers/src/dotnet/database/Library/obj/Debug/refactor.xml -/workspaces/azuresql-devcontainers/src/dotnet/database/Library/obj/Debug/postdeploy.sql -/workspaces/azuresql-devcontainers/src/dotnet/database/Library/obj/Debug/predeploy.sql -/workspaces/azuresql-devcontainers/src/dotnet/database/Library/obj/Debug/Library.dll -/workspaces/azuresql-devcontainers/src/dotnet/database/Library/obj/Debug/Library.pdb diff --git a/src/dotnet/database/Library/obj/Debug/Model.xml b/src/dotnet/database/Library/obj/Debug/Model.xml deleted file mode 100644 index 484937a..0000000 --- a/src/dotnet/database/Library/obj/Debug/Model.xml +++ /dev/null @@ -1,795 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - and - ( - concat(a.first_name, ' ', (a.middle_name + ' '), a.last_name) like @authorSearchString - or - concat(a.first_name, ' ', a.last_name) like @authorSearchString -);]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/src/dotnet/database/Library/obj/Debug/postdeploy.sql b/src/dotnet/database/Library/obj/Debug/postdeploy.sql deleted file mode 100644 index 8b3bc49..0000000 --- a/src/dotnet/database/Library/obj/Debug/postdeploy.sql +++ /dev/null @@ -1,332 +0,0 @@ --- This file contains SQL statements that will be executed after the build script. --- Authors data ---------------------------------------------------------------------------- -IF NOT EXISTS (SELECT 1 FROM dbo.authors WHERE id = 1) -BEGIN - INSERT INTO dbo.authors (id, first_name, middle_name, last_name) - VALUES (1, 'Isaac', 'Yudovick', 'Asimov') -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.authors WHERE id = 2) -BEGIN - INSERT INTO dbo.authors (id, first_name, middle_name, last_name) - VALUES (2, 'Arthur', 'Charles', 'Clarke') -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.authors WHERE id = 3) -BEGIN - INSERT INTO dbo.authors (id, first_name, middle_name, last_name) - VALUES (3, 'Herbert', 'George', 'Wells') -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.authors WHERE id = 4) -BEGIN - INSERT INTO dbo.authors (id, first_name, middle_name, last_name) - VALUES (4, 'Jules', 'Gabriel', 'Verne') -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.authors WHERE id = 5) -BEGIN - INSERT INTO dbo.authors (id, first_name, middle_name, last_name) - VALUES (5, 'Philip', 'Kindred', 'Dick') -END; -GO - --- Books data ---------------------------------------------------------------------------- -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1000) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1000, 'Prelude to Foundation', 1988, 403) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1001) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1001, 'Forward the Foundation', 1993, 417) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1002) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1002, 'Foundation', 1951, 255) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1003) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1003, 'Foundation and Empire', 1952, 247) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1004) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1004, 'Second Foundation', 1953, 210) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1005) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1005, 'Foundation''s Edge', 1982, 367) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1006) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1006, 'Foundation and Earth', 1986, 356) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1007) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1007, 'Nemesis', 1989, 386) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1008) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1008, '2001: A Space Odyssey', 1968, 221) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1009) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1009, '2010: Odyssey Two', 1982, 291) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1010) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1010, '2061: Odyssey Three ', 1987, 256) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1011) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1011, '3001: The Final Odyssey ', 1997, 288) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1012) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1012, 'The Time Machine', 1895, 118) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1013) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1013, 'The Island of Doctor Moreau', 1896, 153) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1014) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1014, 'The Invisible Man', 1897, 151) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1015) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1015, 'The War of the Worlds', 1898, 192) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1016) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1016, 'Journey to the Center of the Earth', 1864, 183) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1017) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1017, 'Twenty Thousand Leagues Under the Sea', 1870, 187) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1018) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1018, 'Around the World in Eighty Days', 1873, 167) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1019) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1019, 'From the Earth to the Moon', 1865, 186) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1020) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1020, 'Do Androids Dream of Electric Sheep?', 1968, 244) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1021) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1021, 'Ubik', 1969, 224) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1022) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1022, 'The Man in the High Castle', 1962, 259) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1023) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1023, 'A Scanner Darkly', 1977, 224) -END; -GO - --- Books + Authors data ---------------------------------------------------------------------------- --- Insert records for author 1 -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1000) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1000) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1001) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1001) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1002) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1002) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1003) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1003) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1004) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1004) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1005) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1005) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1006) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1006) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1007) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1007) -END; - --- Insert records for author 2 -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 2 AND book_id = 1008) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (2, 1008) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 2 AND book_id = 1009) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (2, 1009) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 2 AND book_id = 1010) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (2, 1010) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 2 AND book_id = 1011) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (2, 1011) -END; - --- Insert records for author 3 -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 3 AND book_id = 1012) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (3, 1012) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 3 AND book_id = 1013) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (3, 1013) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 3 AND book_id = 1014) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (3, 1014) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 3 AND book_id = 1015) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (3, 1015) -END; - --- Insert records for author 4 -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 4 AND book_id = 1016) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (4, 1016) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 4 AND book_id = 1017) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (4, 1017) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 4 AND book_id = 1018) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (4, 1018) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 4 AND book_id = 1019) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (4, 1019) -END; - --- Insert records for author 5 -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 5 AND book_id = 1020) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (5, 1020) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 5 AND book_id = 1021) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (5, 1021) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 5 AND book_id = 1022) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (5, 1022) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 5 AND book_id = 1023) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (5, 1023) -END; -GO diff --git a/src/dotnet/database/Library/obj/Library.sqlproj.nuget.dgspec.json b/src/dotnet/database/Library/obj/Library.sqlproj.nuget.dgspec.json deleted file mode 100644 index 55f5e3f..0000000 --- a/src/dotnet/database/Library/obj/Library.sqlproj.nuget.dgspec.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "format": 1, - "restore": { - "/workspaces/azuresql-devcontainers/src/dotnet/database/Library/Library.sqlproj": {} - }, - "projects": { - "/workspaces/azuresql-devcontainers/src/dotnet/database/Library/Library.sqlproj": { - "version": "1.0.0", - "restore": { - "projectUniqueName": "/workspaces/azuresql-devcontainers/src/dotnet/database/Library/Library.sqlproj", - "projectName": "Library", - "projectPath": "/workspaces/azuresql-devcontainers/src/dotnet/database/Library/Library.sqlproj", - "packagesPath": "/home/codespace/.nuget/packages/", - "outputPath": "/workspaces/azuresql-devcontainers/src/dotnet/database/Library/obj/", - "projectStyle": "PackageReference", - "skipContentFileWrite": true, - "configFilePaths": [ - "/home/codespace/.nuget/NuGet/NuGet.Config" - ], - "originalTargetFrameworks": [ - "net46" - ], - "sources": { - "https://api.nuget.org/v3/index.json": {} - }, - "frameworks": { - "net46": { - "projectReferences": {} - } - }, - "warningProperties": { - "noWarn": [ - "NU5128" - ] - }, - "restoreAuditProperties": { - "enableAudit": "true", - "auditLevel": "low", - "auditMode": "direct" - } - }, - "frameworks": { - "net46": { - "dependencies": { - "Microsoft.NETFramework.ReferenceAssemblies": { - "suppressParent": "All", - "target": "Package", - "version": "[1.0.0, )" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/src/dotnet/database/Library/obj/Library.sqlproj.nuget.g.props b/src/dotnet/database/Library/obj/Library.sqlproj.nuget.g.props deleted file mode 100644 index 0648942..0000000 --- a/src/dotnet/database/Library/obj/Library.sqlproj.nuget.g.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - True - NuGet - $(MSBuildThisFileDirectory)project.assets.json - /home/codespace/.nuget/packages/ - /home/codespace/.nuget/packages/ - PackageReference - 6.10.0 - - - - - \ No newline at end of file diff --git a/src/dotnet/database/Library/obj/Library.sqlproj.nuget.g.targets b/src/dotnet/database/Library/obj/Library.sqlproj.nuget.g.targets deleted file mode 100644 index ddbd0a3..0000000 --- a/src/dotnet/database/Library/obj/Library.sqlproj.nuget.g.targets +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/dotnet/database/Library/obj/project.assets.json b/src/dotnet/database/Library/obj/project.assets.json deleted file mode 100644 index 0c39123..0000000 --- a/src/dotnet/database/Library/obj/project.assets.json +++ /dev/null @@ -1,415 +0,0 @@ -{ - "version": 3, - "targets": { - ".NETFramework,Version=v4.6": { - "Microsoft.NETFramework.ReferenceAssemblies/1.0.0": { - "type": "package", - "dependencies": { - "Microsoft.NETFramework.ReferenceAssemblies.net46": "1.0.0" - } - }, - "Microsoft.NETFramework.ReferenceAssemblies.net46/1.0.0": { - "type": "package", - "build": { - "build/Microsoft.NETFramework.ReferenceAssemblies.net46.targets": {} - } - } - } - }, - "libraries": { - "Microsoft.NETFramework.ReferenceAssemblies/1.0.0": { - "sha512": "7D2TMufjGiowmt0E941kVoTIS+GTNzaPopuzM1/1LSaJAdJdBrVP0SkZW7AgDd0a2U1DjsIeaKG1wxGVBNLDMw==", - "type": "package", - "path": "microsoft.netframework.referenceassemblies/1.0.0", - "files": [ - ".nupkg.metadata", - ".signature.p7s", - "microsoft.netframework.referenceassemblies.1.0.0.nupkg.sha512", - "microsoft.netframework.referenceassemblies.nuspec" - ] - }, - "Microsoft.NETFramework.ReferenceAssemblies.net46/1.0.0": { - "sha512": "Zhtz+rFItjyGS3jMl9F011VJYLKyW6hwEUMsH/KfM2w0YrxoeFc8gO9iaOxCdN+bJFs/p2a+kHF1vNJ4y2+LfQ==", - "type": "package", - "path": "microsoft.netframework.referenceassemblies.net46/1.0.0", - "files": [ - ".nupkg.metadata", - ".signature.p7s", - "build/.NETFramework/v4.6/Accessibility.dll", - "build/.NETFramework/v4.6/Accessibility.xml", - "build/.NETFramework/v4.6/CustomMarshalers.dll", - "build/.NETFramework/v4.6/CustomMarshalers.xml", - "build/.NETFramework/v4.6/Facades/System.Collections.Concurrent.dll", - "build/.NETFramework/v4.6/Facades/System.Collections.dll", - "build/.NETFramework/v4.6/Facades/System.ComponentModel.Annotations.dll", - "build/.NETFramework/v4.6/Facades/System.ComponentModel.EventBasedAsync.dll", - "build/.NETFramework/v4.6/Facades/System.ComponentModel.dll", - "build/.NETFramework/v4.6/Facades/System.Diagnostics.Contracts.dll", - "build/.NETFramework/v4.6/Facades/System.Diagnostics.Debug.dll", - "build/.NETFramework/v4.6/Facades/System.Diagnostics.Tools.dll", - "build/.NETFramework/v4.6/Facades/System.Diagnostics.Tracing.dll", - "build/.NETFramework/v4.6/Facades/System.Dynamic.Runtime.dll", - "build/.NETFramework/v4.6/Facades/System.Globalization.dll", - "build/.NETFramework/v4.6/Facades/System.IO.dll", - "build/.NETFramework/v4.6/Facades/System.Linq.Expressions.dll", - "build/.NETFramework/v4.6/Facades/System.Linq.Parallel.dll", - "build/.NETFramework/v4.6/Facades/System.Linq.Queryable.dll", - "build/.NETFramework/v4.6/Facades/System.Linq.dll", - "build/.NETFramework/v4.6/Facades/System.Net.NetworkInformation.dll", - "build/.NETFramework/v4.6/Facades/System.Net.Primitives.dll", - "build/.NETFramework/v4.6/Facades/System.Net.Requests.dll", - "build/.NETFramework/v4.6/Facades/System.Net.WebHeaderCollection.dll", - "build/.NETFramework/v4.6/Facades/System.ObjectModel.dll", - "build/.NETFramework/v4.6/Facades/System.Reflection.Emit.ILGeneration.dll", - "build/.NETFramework/v4.6/Facades/System.Reflection.Emit.Lightweight.dll", - "build/.NETFramework/v4.6/Facades/System.Reflection.Emit.dll", - "build/.NETFramework/v4.6/Facades/System.Reflection.Extensions.dll", - "build/.NETFramework/v4.6/Facades/System.Reflection.Primitives.dll", - "build/.NETFramework/v4.6/Facades/System.Reflection.dll", - "build/.NETFramework/v4.6/Facades/System.Resources.ResourceManager.dll", - "build/.NETFramework/v4.6/Facades/System.Runtime.Extensions.dll", - "build/.NETFramework/v4.6/Facades/System.Runtime.Handles.dll", - "build/.NETFramework/v4.6/Facades/System.Runtime.InteropServices.WindowsRuntime.dll", - "build/.NETFramework/v4.6/Facades/System.Runtime.InteropServices.dll", - "build/.NETFramework/v4.6/Facades/System.Runtime.Numerics.dll", - "build/.NETFramework/v4.6/Facades/System.Runtime.Serialization.Json.dll", - "build/.NETFramework/v4.6/Facades/System.Runtime.Serialization.Primitives.dll", - "build/.NETFramework/v4.6/Facades/System.Runtime.Serialization.Xml.dll", - "build/.NETFramework/v4.6/Facades/System.Runtime.dll", - "build/.NETFramework/v4.6/Facades/System.Security.Principal.dll", - "build/.NETFramework/v4.6/Facades/System.ServiceModel.Duplex.dll", - "build/.NETFramework/v4.6/Facades/System.ServiceModel.Http.dll", - "build/.NETFramework/v4.6/Facades/System.ServiceModel.NetTcp.dll", - "build/.NETFramework/v4.6/Facades/System.ServiceModel.Primitives.dll", - "build/.NETFramework/v4.6/Facades/System.ServiceModel.Security.dll", - "build/.NETFramework/v4.6/Facades/System.Text.Encoding.Extensions.dll", - "build/.NETFramework/v4.6/Facades/System.Text.Encoding.dll", - "build/.NETFramework/v4.6/Facades/System.Text.RegularExpressions.dll", - "build/.NETFramework/v4.6/Facades/System.Threading.Tasks.Parallel.dll", - "build/.NETFramework/v4.6/Facades/System.Threading.Tasks.dll", - "build/.NETFramework/v4.6/Facades/System.Threading.Timer.dll", - "build/.NETFramework/v4.6/Facades/System.Threading.dll", - "build/.NETFramework/v4.6/Facades/System.Xml.ReaderWriter.dll", - "build/.NETFramework/v4.6/Facades/System.Xml.XDocument.dll", - "build/.NETFramework/v4.6/Facades/System.Xml.XmlSerializer.dll", - "build/.NETFramework/v4.6/ISymWrapper.dll", - "build/.NETFramework/v4.6/ISymWrapper.xml", - "build/.NETFramework/v4.6/Microsoft.Activities.Build.dll", - "build/.NETFramework/v4.6/Microsoft.Activities.Build.xml", - "build/.NETFramework/v4.6/Microsoft.Build.Conversion.v4.0.dll", - "build/.NETFramework/v4.6/Microsoft.Build.Conversion.v4.0.xml", - "build/.NETFramework/v4.6/Microsoft.Build.Engine.dll", - "build/.NETFramework/v4.6/Microsoft.Build.Engine.xml", - "build/.NETFramework/v4.6/Microsoft.Build.Framework.dll", - "build/.NETFramework/v4.6/Microsoft.Build.Framework.xml", - "build/.NETFramework/v4.6/Microsoft.Build.Tasks.v4.0.dll", - "build/.NETFramework/v4.6/Microsoft.Build.Tasks.v4.0.xml", - "build/.NETFramework/v4.6/Microsoft.Build.Utilities.v4.0.dll", - "build/.NETFramework/v4.6/Microsoft.Build.Utilities.v4.0.xml", - "build/.NETFramework/v4.6/Microsoft.Build.dll", - "build/.NETFramework/v4.6/Microsoft.Build.xml", - "build/.NETFramework/v4.6/Microsoft.CSharp.dll", - "build/.NETFramework/v4.6/Microsoft.CSharp.xml", - "build/.NETFramework/v4.6/Microsoft.JScript.dll", - "build/.NETFramework/v4.6/Microsoft.JScript.xml", - "build/.NETFramework/v4.6/Microsoft.VisualBasic.Compatibility.Data.dll", - "build/.NETFramework/v4.6/Microsoft.VisualBasic.Compatibility.Data.xml", - "build/.NETFramework/v4.6/Microsoft.VisualBasic.Compatibility.dll", - "build/.NETFramework/v4.6/Microsoft.VisualBasic.Compatibility.xml", - "build/.NETFramework/v4.6/Microsoft.VisualBasic.dll", - "build/.NETFramework/v4.6/Microsoft.VisualBasic.xml", - "build/.NETFramework/v4.6/Microsoft.VisualC.STLCLR.dll", - "build/.NETFramework/v4.6/Microsoft.VisualC.STLCLR.xml", - "build/.NETFramework/v4.6/Microsoft.VisualC.dll", - "build/.NETFramework/v4.6/Microsoft.VisualC.xml", - "build/.NETFramework/v4.6/PermissionSets/FullTrust.xml", - "build/.NETFramework/v4.6/PermissionSets/Internet.xml", - "build/.NETFramework/v4.6/PermissionSets/LocalIntranet.xml", - "build/.NETFramework/v4.6/PresentationBuildTasks.dll", - "build/.NETFramework/v4.6/PresentationBuildTasks.xml", - "build/.NETFramework/v4.6/PresentationCore.dll", - "build/.NETFramework/v4.6/PresentationCore.xml", - "build/.NETFramework/v4.6/PresentationFramework.Aero.dll", - "build/.NETFramework/v4.6/PresentationFramework.Aero.xml", - "build/.NETFramework/v4.6/PresentationFramework.Aero2.dll", - "build/.NETFramework/v4.6/PresentationFramework.Aero2.xml", - "build/.NETFramework/v4.6/PresentationFramework.AeroLite.dll", - "build/.NETFramework/v4.6/PresentationFramework.AeroLite.xml", - "build/.NETFramework/v4.6/PresentationFramework.Classic.dll", - "build/.NETFramework/v4.6/PresentationFramework.Classic.xml", - "build/.NETFramework/v4.6/PresentationFramework.Luna.dll", - "build/.NETFramework/v4.6/PresentationFramework.Luna.xml", - "build/.NETFramework/v4.6/PresentationFramework.Royale.dll", - "build/.NETFramework/v4.6/PresentationFramework.Royale.xml", - "build/.NETFramework/v4.6/PresentationFramework.dll", - "build/.NETFramework/v4.6/PresentationFramework.xml", - "build/.NETFramework/v4.6/ReachFramework.dll", - "build/.NETFramework/v4.6/ReachFramework.xml", - "build/.NETFramework/v4.6/RedistList/FrameworkList.xml", - "build/.NETFramework/v4.6/System.Activities.Core.Presentation.dll", - "build/.NETFramework/v4.6/System.Activities.Core.Presentation.xml", - "build/.NETFramework/v4.6/System.Activities.DurableInstancing.dll", - "build/.NETFramework/v4.6/System.Activities.DurableInstancing.xml", - "build/.NETFramework/v4.6/System.Activities.Presentation.dll", - "build/.NETFramework/v4.6/System.Activities.Presentation.xml", - "build/.NETFramework/v4.6/System.Activities.dll", - "build/.NETFramework/v4.6/System.Activities.xml", - "build/.NETFramework/v4.6/System.AddIn.Contract.dll", - "build/.NETFramework/v4.6/System.AddIn.Contract.xml", - "build/.NETFramework/v4.6/System.AddIn.dll", - "build/.NETFramework/v4.6/System.AddIn.xml", - "build/.NETFramework/v4.6/System.ComponentModel.Composition.Registration.dll", - "build/.NETFramework/v4.6/System.ComponentModel.Composition.Registration.xml", - "build/.NETFramework/v4.6/System.ComponentModel.Composition.dll", - "build/.NETFramework/v4.6/System.ComponentModel.Composition.xml", - "build/.NETFramework/v4.6/System.ComponentModel.DataAnnotations.dll", - "build/.NETFramework/v4.6/System.ComponentModel.DataAnnotations.xml", - "build/.NETFramework/v4.6/System.Configuration.Install.dll", - "build/.NETFramework/v4.6/System.Configuration.Install.xml", - "build/.NETFramework/v4.6/System.Configuration.dll", - "build/.NETFramework/v4.6/System.Configuration.xml", - "build/.NETFramework/v4.6/System.Core.dll", - "build/.NETFramework/v4.6/System.Core.xml", - "build/.NETFramework/v4.6/System.Data.DataSetExtensions.dll", - "build/.NETFramework/v4.6/System.Data.DataSetExtensions.xml", - "build/.NETFramework/v4.6/System.Data.Entity.Design.dll", - "build/.NETFramework/v4.6/System.Data.Entity.Design.xml", - "build/.NETFramework/v4.6/System.Data.Entity.dll", - "build/.NETFramework/v4.6/System.Data.Entity.xml", - "build/.NETFramework/v4.6/System.Data.Linq.dll", - "build/.NETFramework/v4.6/System.Data.Linq.xml", - "build/.NETFramework/v4.6/System.Data.OracleClient.dll", - "build/.NETFramework/v4.6/System.Data.OracleClient.xml", - "build/.NETFramework/v4.6/System.Data.Services.Client.dll", - "build/.NETFramework/v4.6/System.Data.Services.Client.xml", - "build/.NETFramework/v4.6/System.Data.Services.Design.dll", - "build/.NETFramework/v4.6/System.Data.Services.Design.xml", - "build/.NETFramework/v4.6/System.Data.Services.dll", - "build/.NETFramework/v4.6/System.Data.Services.xml", - "build/.NETFramework/v4.6/System.Data.SqlXml.dll", - "build/.NETFramework/v4.6/System.Data.SqlXml.xml", - "build/.NETFramework/v4.6/System.Data.dll", - "build/.NETFramework/v4.6/System.Data.xml", - "build/.NETFramework/v4.6/System.Deployment.dll", - "build/.NETFramework/v4.6/System.Deployment.xml", - "build/.NETFramework/v4.6/System.Design.dll", - "build/.NETFramework/v4.6/System.Design.xml", - "build/.NETFramework/v4.6/System.Device.dll", - "build/.NETFramework/v4.6/System.Device.xml", - "build/.NETFramework/v4.6/System.DirectoryServices.AccountManagement.dll", - "build/.NETFramework/v4.6/System.DirectoryServices.AccountManagement.xml", - "build/.NETFramework/v4.6/System.DirectoryServices.Protocols.dll", - "build/.NETFramework/v4.6/System.DirectoryServices.Protocols.xml", - "build/.NETFramework/v4.6/System.DirectoryServices.dll", - "build/.NETFramework/v4.6/System.DirectoryServices.xml", - "build/.NETFramework/v4.6/System.Drawing.Design.dll", - "build/.NETFramework/v4.6/System.Drawing.Design.xml", - "build/.NETFramework/v4.6/System.Drawing.dll", - "build/.NETFramework/v4.6/System.Drawing.xml", - "build/.NETFramework/v4.6/System.Dynamic.dll", - "build/.NETFramework/v4.6/System.EnterpriseServices.Thunk.dll", - "build/.NETFramework/v4.6/System.EnterpriseServices.Wrapper.dll", - "build/.NETFramework/v4.6/System.EnterpriseServices.dll", - "build/.NETFramework/v4.6/System.EnterpriseServices.xml", - "build/.NETFramework/v4.6/System.IO.Compression.FileSystem.dll", - "build/.NETFramework/v4.6/System.IO.Compression.FileSystem.xml", - "build/.NETFramework/v4.6/System.IO.Compression.dll", - "build/.NETFramework/v4.6/System.IO.Compression.xml", - "build/.NETFramework/v4.6/System.IO.Log.dll", - "build/.NETFramework/v4.6/System.IO.Log.xml", - "build/.NETFramework/v4.6/System.IdentityModel.Selectors.dll", - "build/.NETFramework/v4.6/System.IdentityModel.Selectors.xml", - "build/.NETFramework/v4.6/System.IdentityModel.Services.dll", - "build/.NETFramework/v4.6/System.IdentityModel.Services.xml", - "build/.NETFramework/v4.6/System.IdentityModel.dll", - "build/.NETFramework/v4.6/System.IdentityModel.xml", - "build/.NETFramework/v4.6/System.Linq.xml", - "build/.NETFramework/v4.6/System.Management.Instrumentation.dll", - "build/.NETFramework/v4.6/System.Management.Instrumentation.xml", - "build/.NETFramework/v4.6/System.Management.dll", - "build/.NETFramework/v4.6/System.Management.xml", - "build/.NETFramework/v4.6/System.Messaging.dll", - "build/.NETFramework/v4.6/System.Messaging.xml", - "build/.NETFramework/v4.6/System.Net.Http.WebRequest.dll", - "build/.NETFramework/v4.6/System.Net.Http.WebRequest.xml", - "build/.NETFramework/v4.6/System.Net.Http.dll", - "build/.NETFramework/v4.6/System.Net.Http.xml", - "build/.NETFramework/v4.6/System.Net.dll", - "build/.NETFramework/v4.6/System.Net.xml", - "build/.NETFramework/v4.6/System.Numerics.Vectors.dll", - "build/.NETFramework/v4.6/System.Numerics.dll", - "build/.NETFramework/v4.6/System.Numerics.xml", - "build/.NETFramework/v4.6/System.Printing.dll", - "build/.NETFramework/v4.6/System.Printing.xml", - "build/.NETFramework/v4.6/System.Reflection.Context.dll", - "build/.NETFramework/v4.6/System.Reflection.Context.xml", - "build/.NETFramework/v4.6/System.Runtime.Caching.dll", - "build/.NETFramework/v4.6/System.Runtime.Caching.xml", - "build/.NETFramework/v4.6/System.Runtime.DurableInstancing.dll", - "build/.NETFramework/v4.6/System.Runtime.DurableInstancing.xml", - "build/.NETFramework/v4.6/System.Runtime.Remoting.dll", - "build/.NETFramework/v4.6/System.Runtime.Remoting.xml", - "build/.NETFramework/v4.6/System.Runtime.Serialization.Formatters.Soap.dll", - "build/.NETFramework/v4.6/System.Runtime.Serialization.Formatters.Soap.xml", - "build/.NETFramework/v4.6/System.Runtime.Serialization.dll", - "build/.NETFramework/v4.6/System.Runtime.Serialization.xml", - "build/.NETFramework/v4.6/System.Security.dll", - "build/.NETFramework/v4.6/System.Security.xml", - "build/.NETFramework/v4.6/System.ServiceModel.Activation.dll", - "build/.NETFramework/v4.6/System.ServiceModel.Activation.xml", - "build/.NETFramework/v4.6/System.ServiceModel.Activities.dll", - "build/.NETFramework/v4.6/System.ServiceModel.Activities.xml", - "build/.NETFramework/v4.6/System.ServiceModel.Channels.dll", - "build/.NETFramework/v4.6/System.ServiceModel.Channels.xml", - "build/.NETFramework/v4.6/System.ServiceModel.Discovery.dll", - "build/.NETFramework/v4.6/System.ServiceModel.Discovery.xml", - "build/.NETFramework/v4.6/System.ServiceModel.Routing.dll", - "build/.NETFramework/v4.6/System.ServiceModel.Routing.xml", - "build/.NETFramework/v4.6/System.ServiceModel.Web.dll", - "build/.NETFramework/v4.6/System.ServiceModel.Web.xml", - "build/.NETFramework/v4.6/System.ServiceModel.dll", - "build/.NETFramework/v4.6/System.ServiceModel.xml", - "build/.NETFramework/v4.6/System.ServiceProcess.dll", - "build/.NETFramework/v4.6/System.ServiceProcess.xml", - "build/.NETFramework/v4.6/System.Speech.dll", - "build/.NETFramework/v4.6/System.Speech.xml", - "build/.NETFramework/v4.6/System.Threading.Tasks.Dataflow.xml", - "build/.NETFramework/v4.6/System.Transactions.dll", - "build/.NETFramework/v4.6/System.Transactions.xml", - "build/.NETFramework/v4.6/System.Web.Abstractions.dll", - "build/.NETFramework/v4.6/System.Web.ApplicationServices.dll", - "build/.NETFramework/v4.6/System.Web.ApplicationServices.xml", - "build/.NETFramework/v4.6/System.Web.DataVisualization.Design.dll", - "build/.NETFramework/v4.6/System.Web.DataVisualization.dll", - "build/.NETFramework/v4.6/System.Web.DataVisualization.xml", - "build/.NETFramework/v4.6/System.Web.DynamicData.Design.dll", - "build/.NETFramework/v4.6/System.Web.DynamicData.Design.xml", - "build/.NETFramework/v4.6/System.Web.DynamicData.dll", - "build/.NETFramework/v4.6/System.Web.DynamicData.xml", - "build/.NETFramework/v4.6/System.Web.Entity.Design.dll", - "build/.NETFramework/v4.6/System.Web.Entity.Design.xml", - "build/.NETFramework/v4.6/System.Web.Entity.dll", - "build/.NETFramework/v4.6/System.Web.Entity.xml", - "build/.NETFramework/v4.6/System.Web.Extensions.Design.dll", - "build/.NETFramework/v4.6/System.Web.Extensions.Design.xml", - "build/.NETFramework/v4.6/System.Web.Extensions.dll", - "build/.NETFramework/v4.6/System.Web.Extensions.xml", - "build/.NETFramework/v4.6/System.Web.Mobile.dll", - "build/.NETFramework/v4.6/System.Web.Mobile.xml", - "build/.NETFramework/v4.6/System.Web.RegularExpressions.dll", - "build/.NETFramework/v4.6/System.Web.RegularExpressions.xml", - "build/.NETFramework/v4.6/System.Web.Routing.dll", - "build/.NETFramework/v4.6/System.Web.Services.dll", - "build/.NETFramework/v4.6/System.Web.Services.xml", - "build/.NETFramework/v4.6/System.Web.dll", - "build/.NETFramework/v4.6/System.Web.xml", - "build/.NETFramework/v4.6/System.Windows.Controls.Ribbon.dll", - "build/.NETFramework/v4.6/System.Windows.Controls.Ribbon.xml", - "build/.NETFramework/v4.6/System.Windows.Forms.DataVisualization.Design.dll", - "build/.NETFramework/v4.6/System.Windows.Forms.DataVisualization.dll", - "build/.NETFramework/v4.6/System.Windows.Forms.DataVisualization.xml", - "build/.NETFramework/v4.6/System.Windows.Forms.dll", - "build/.NETFramework/v4.6/System.Windows.Forms.xml", - "build/.NETFramework/v4.6/System.Windows.Input.Manipulations.dll", - "build/.NETFramework/v4.6/System.Windows.Input.Manipulations.xml", - "build/.NETFramework/v4.6/System.Windows.Presentation.dll", - "build/.NETFramework/v4.6/System.Windows.Presentation.xml", - "build/.NETFramework/v4.6/System.Windows.dll", - "build/.NETFramework/v4.6/System.Workflow.Activities.dll", - "build/.NETFramework/v4.6/System.Workflow.Activities.xml", - "build/.NETFramework/v4.6/System.Workflow.ComponentModel.dll", - "build/.NETFramework/v4.6/System.Workflow.ComponentModel.xml", - "build/.NETFramework/v4.6/System.Workflow.Runtime.dll", - "build/.NETFramework/v4.6/System.Workflow.Runtime.xml", - "build/.NETFramework/v4.6/System.WorkflowServices.dll", - "build/.NETFramework/v4.6/System.WorkflowServices.xml", - "build/.NETFramework/v4.6/System.Xaml.dll", - "build/.NETFramework/v4.6/System.Xaml.xml", - "build/.NETFramework/v4.6/System.Xml.Linq.dll", - "build/.NETFramework/v4.6/System.Xml.Linq.xml", - "build/.NETFramework/v4.6/System.Xml.Serialization.dll", - "build/.NETFramework/v4.6/System.Xml.dll", - "build/.NETFramework/v4.6/System.Xml.xml", - "build/.NETFramework/v4.6/System.dll", - "build/.NETFramework/v4.6/System.xml", - "build/.NETFramework/v4.6/UIAutomationClient.dll", - "build/.NETFramework/v4.6/UIAutomationClient.xml", - "build/.NETFramework/v4.6/UIAutomationClientsideProviders.dll", - "build/.NETFramework/v4.6/UIAutomationClientsideProviders.xml", - "build/.NETFramework/v4.6/UIAutomationProvider.dll", - "build/.NETFramework/v4.6/UIAutomationProvider.xml", - "build/.NETFramework/v4.6/UIAutomationTypes.dll", - "build/.NETFramework/v4.6/UIAutomationTypes.xml", - "build/.NETFramework/v4.6/WindowsBase.dll", - "build/.NETFramework/v4.6/WindowsBase.xml", - "build/.NETFramework/v4.6/WindowsFormsIntegration.dll", - "build/.NETFramework/v4.6/WindowsFormsIntegration.xml", - "build/.NETFramework/v4.6/XamlBuildTask.dll", - "build/.NETFramework/v4.6/XamlBuildTask.xml", - "build/.NETFramework/v4.6/mscorlib.dll", - "build/.NETFramework/v4.6/mscorlib.xml", - "build/.NETFramework/v4.6/namespaces.xml", - "build/.NETFramework/v4.6/sysglobl.dll", - "build/.NETFramework/v4.6/sysglobl.xml", - "build/Microsoft.NETFramework.ReferenceAssemblies.net46.targets", - "microsoft.netframework.referenceassemblies.net46.1.0.0.nupkg.sha512", - "microsoft.netframework.referenceassemblies.net46.nuspec" - ] - } - }, - "projectFileDependencyGroups": { - ".NETFramework,Version=v4.6": [ - "Microsoft.NETFramework.ReferenceAssemblies >= 1.0.0" - ] - }, - "packageFolders": { - "/home/codespace/.nuget/packages/": {} - }, - "project": { - "version": "1.0.0", - "restore": { - "projectUniqueName": "/workspaces/azuresql-devcontainers/src/dotnet/database/Library/Library.sqlproj", - "projectName": "Library", - "projectPath": "/workspaces/azuresql-devcontainers/src/dotnet/database/Library/Library.sqlproj", - "packagesPath": "/home/codespace/.nuget/packages/", - "outputPath": "/workspaces/azuresql-devcontainers/src/dotnet/database/Library/obj/", - "projectStyle": "PackageReference", - "skipContentFileWrite": true, - "configFilePaths": [ - "/home/codespace/.nuget/NuGet/NuGet.Config" - ], - "originalTargetFrameworks": [ - "net46" - ], - "sources": { - "https://api.nuget.org/v3/index.json": {} - }, - "frameworks": { - "net46": { - "projectReferences": {} - } - }, - "warningProperties": { - "noWarn": [ - "NU5128" - ] - }, - "restoreAuditProperties": { - "enableAudit": "true", - "auditLevel": "low", - "auditMode": "direct" - } - }, - "frameworks": { - "net46": { - "dependencies": { - "Microsoft.NETFramework.ReferenceAssemblies": { - "suppressParent": "All", - "target": "Package", - "version": "[1.0.0, )" - } - } - } - } - } -} \ No newline at end of file diff --git a/src/dotnet/database/Library/obj/project.nuget.cache b/src/dotnet/database/Library/obj/project.nuget.cache deleted file mode 100644 index 90e4a64..0000000 --- a/src/dotnet/database/Library/obj/project.nuget.cache +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": 2, - "dgSpecHash": "GUDkKjZthvo=", - "success": true, - "projectFilePath": "/workspaces/azuresql-devcontainers/src/dotnet/database/Library/Library.sqlproj", - "expectedPackageFiles": [ - "/home/codespace/.nuget/packages/microsoft.netframework.referenceassemblies/1.0.0/microsoft.netframework.referenceassemblies.1.0.0.nupkg.sha512", - "/home/codespace/.nuget/packages/microsoft.netframework.referenceassemblies.net46/1.0.0/microsoft.netframework.referenceassemblies.net46.1.0.0.nupkg.sha512" - ], - "logs": [] -} \ No newline at end of file diff --git a/src/dotnet/database/Library/postDeployment.sql b/src/dotnet/database/Library/postDeployment.sql deleted file mode 100644 index c6aafc4..0000000 --- a/src/dotnet/database/Library/postDeployment.sql +++ /dev/null @@ -1,332 +0,0 @@ --- This file contains SQL statements that will be executed after the build script. --- Authors data ---------------------------------------------------------------------------- -IF NOT EXISTS (SELECT 1 FROM dbo.authors WHERE id = 1) -BEGIN - INSERT INTO dbo.authors (id, first_name, middle_name, last_name) - VALUES (1, 'Isaac', 'Yudovick', 'Asimov') -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.authors WHERE id = 2) -BEGIN - INSERT INTO dbo.authors (id, first_name, middle_name, last_name) - VALUES (2, 'Arthur', 'Charles', 'Clarke') -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.authors WHERE id = 3) -BEGIN - INSERT INTO dbo.authors (id, first_name, middle_name, last_name) - VALUES (3, 'Herbert', 'George', 'Wells') -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.authors WHERE id = 4) -BEGIN - INSERT INTO dbo.authors (id, first_name, middle_name, last_name) - VALUES (4, 'Jules', 'Gabriel', 'Verne') -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.authors WHERE id = 5) -BEGIN - INSERT INTO dbo.authors (id, first_name, middle_name, last_name) - VALUES (5, 'Philip', 'Kindred', 'Dick') -END; -GO - --- Books data ---------------------------------------------------------------------------- -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1000) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1000, 'Prelude to Foundation', 1988, 403) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1001) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1001, 'Forward the Foundation', 1993, 417) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1002) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1002, 'Foundation', 1951, 255) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1003) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1003, 'Foundation and Empire', 1952, 247) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1004) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1004, 'Second Foundation', 1953, 210) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1005) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1005, 'Foundation''s Edge', 1982, 367) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1006) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1006, 'Foundation and Earth', 1986, 356) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1007) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1007, 'Nemesis', 1989, 386) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1008) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1008, '2001: A Space Odyssey', 1968, 221) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1009) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1009, '2010: Odyssey Two', 1982, 291) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1010) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1010, '2061: Odyssey Three ', 1987, 256) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1011) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1011, '3001: The Final Odyssey ', 1997, 288) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1012) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1012, 'The Time Machine', 1895, 118) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1013) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1013, 'The Island of Doctor Moreau', 1896, 153) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1014) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1014, 'The Invisible Man', 1897, 151) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1015) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1015, 'The War of the Worlds', 1898, 192) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1016) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1016, 'Journey to the Center of the Earth', 1864, 183) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1017) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1017, 'Twenty Thousand Leagues Under the Sea', 1870, 187) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1018) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1018, 'Around the World in Eighty Days', 1873, 167) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1019) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1019, 'From the Earth to the Moon', 1865, 186) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1020) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1020, 'Do Androids Dream of Electric Sheep?', 1968, 244) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1021) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1021, 'Ubik', 1969, 224) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1022) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1022, 'The Man in the High Castle', 1962, 259) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books WHERE id = 1023) -BEGIN - INSERT INTO dbo.books (id, title, year, pages) - VALUES (1023, 'A Scanner Darkly', 1977, 224) -END; -GO - --- Books + Authors data ---------------------------------------------------------------------------- --- Insert records for author 1 -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1000) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1000) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1001) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1001) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1002) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1002) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1003) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1003) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1004) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1004) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1005) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1005) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1006) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1006) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 1 AND book_id = 1007) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (1, 1007) -END; - --- Insert records for author 2 -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 2 AND book_id = 1008) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (2, 1008) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 2 AND book_id = 1009) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (2, 1009) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 2 AND book_id = 1010) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (2, 1010) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 2 AND book_id = 1011) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (2, 1011) -END; - --- Insert records for author 3 -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 3 AND book_id = 1012) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (3, 1012) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 3 AND book_id = 1013) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (3, 1013) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 3 AND book_id = 1014) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (3, 1014) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 3 AND book_id = 1015) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (3, 1015) -END; - --- Insert records for author 4 -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 4 AND book_id = 1016) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (4, 1016) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 4 AND book_id = 1017) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (4, 1017) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 4 AND book_id = 1018) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (4, 1018) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 4 AND book_id = 1019) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (4, 1019) -END; - --- Insert records for author 5 -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 5 AND book_id = 1020) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (5, 1020) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 5 AND book_id = 1021) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (5, 1021) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 5 AND book_id = 1022) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (5, 1022) -END; - -IF NOT EXISTS (SELECT 1 FROM dbo.books_authors WHERE author_id = 5 AND book_id = 1023) -BEGIN - INSERT INTO dbo.books_authors (author_id, book_id) - VALUES (5, 1023) -END; -GO \ No newline at end of file diff --git a/src/dotnet/devcontainer-template.json b/src/dotnet/devcontainer-template.json deleted file mode 100644 index a444d87..0000000 --- a/src/dotnet/devcontainer-template.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "id": "dotnet", - "version": "1.2.2", - "name": ".NET and Azure SQL", - "description": "A development environment for .NET and Azure SQL, enabling streamlined local development and testing.", - "documentationURL": "https://github.com/microsoft/azuresql-devcontainers/tree/main/src/dotnet", - "publisher": "Azure SQL Developer Experiences Team", - "licenseURL": "https://github.com/devcontainers/templates/blob/main/LICENSE", - "options": { - "imageVariant": { - "type": "string", - "description": ".NET version:", - "proposals": [ - "8.0-bookworm", - "8.0-jammy" - ], - "default": "8.0-bookworm" - } - }, - "platforms": [ - ".NET", - ".NET Core", - "Azure SQL Database" - ] -} diff --git a/src/dotnet/images/vscode-azure-sql-devcontainers-task-continue.png b/src/dotnet/images/vscode-azure-sql-devcontainers-task-continue.png deleted file mode 100644 index 962361a..0000000 Binary files a/src/dotnet/images/vscode-azure-sql-devcontainers-task-continue.png and /dev/null differ diff --git a/src/dotnet/images/vscode-azure-sql-devcontainers-task-dotnet-cert.png b/src/dotnet/images/vscode-azure-sql-devcontainers-task-dotnet-cert.png deleted file mode 100644 index 453e3c4..0000000 Binary files a/src/dotnet/images/vscode-azure-sql-devcontainers-task-dotnet-cert.png and /dev/null differ diff --git a/src/dotnet/images/vscode-azure-sql-devcontainers-task-list-dotnet.png b/src/dotnet/images/vscode-azure-sql-devcontainers-task-list-dotnet.png deleted file mode 100644 index 4def0b7..0000000 Binary files a/src/dotnet/images/vscode-azure-sql-devcontainers-task-list-dotnet.png and /dev/null differ diff --git a/src/dotnet/images/vscode-azure-sql-devcontainers-task-project-build.png b/src/dotnet/images/vscode-azure-sql-devcontainers-task-project-build.png deleted file mode 100644 index 4be07c5..0000000 Binary files a/src/dotnet/images/vscode-azure-sql-devcontainers-task-project-build.png and /dev/null differ diff --git a/src/dotnet/images/vscode-azure-sql-devcontainers-task-project-publish.png b/src/dotnet/images/vscode-azure-sql-devcontainers-task-project-publish.png deleted file mode 100644 index 48659dc..0000000 Binary files a/src/dotnet/images/vscode-azure-sql-devcontainers-task-project-publish.png and /dev/null differ diff --git a/src/dotnet/images/vscode-azure-sql-devcontainers-task-sql-profile.png b/src/dotnet/images/vscode-azure-sql-devcontainers-task-sql-profile.png deleted file mode 100644 index af8b7c0..0000000 Binary files a/src/dotnet/images/vscode-azure-sql-devcontainers-task-sql-profile.png and /dev/null differ diff --git a/src/dotnet/images/vscode-azure-sql-devcontainers-task-sql-results.png b/src/dotnet/images/vscode-azure-sql-devcontainers-task-sql-results.png deleted file mode 100644 index a43effd..0000000 Binary files a/src/dotnet/images/vscode-azure-sql-devcontainers-task-sql-results.png and /dev/null differ diff --git a/src/dotnet/images/vscode-azure-sql-devcontainers-task-sql-run.png b/src/dotnet/images/vscode-azure-sql-devcontainers-task-sql-run.png deleted file mode 100644 index 38bdba8..0000000 Binary files a/src/dotnet/images/vscode-azure-sql-devcontainers-task-sql-run.png and /dev/null differ diff --git a/src/dotnet/images/vscode-azure-sql-devcontainers-tasks.png b/src/dotnet/images/vscode-azure-sql-devcontainers-tasks.png deleted file mode 100644 index aad7f50..0000000 Binary files a/src/dotnet/images/vscode-azure-sql-devcontainers-tasks.png and /dev/null differ diff --git a/src/dotnet/scripts/verifyDatabase.sql b/src/dotnet/scripts/verifyDatabase.sql deleted file mode 100644 index 3b0f898..0000000 --- a/src/dotnet/scripts/verifyDatabase.sql +++ /dev/null @@ -1,5 +0,0 @@ --- Verifying database -select * from library.dbo.authors; -GO -select * from library.dbo.books; -GO \ No newline at end of file