├── todo_app ├── .gitignore ├── .aspire │ └── settings.json ├── TodoApp.Database │ ├── Script.PreDeployment.sql │ ├── dbo.todos.sql │ ├── TodoDB.sqlproj │ └── Script.PostDeployment.sql ├── TodoApp.Frontend │ ├── public │ │ └── favicon.ico │ ├── index.html │ ├── .gitignore │ ├── package.json │ ├── src │ │ ├── styles │ │ │ └── todo-custom.css │ │ ├── main.js │ │ ├── App.vue │ │ └── components │ │ │ ├── UserInfo.vue │ │ │ └── ToDoList.vue │ ├── README.md │ └── vite.config.js ├── TodoApp.AppHost │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Properties │ │ └── launchSettings.json │ ├── Program.cs │ ├── dab-config.json │ └── TodoApp.AppHost.csproj ├── TodoApp.ServiceDefaults │ ├── TodoApp.ServiceDefaults.csproj │ └── Extensions.cs ├── TodoApp.sln └── next-steps.md ├── hostedss - dbup ├── .gitignore ├── WebApplication1 │ ├── WebApplication1.http │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── WebApplication1.csproj │ ├── Properties │ │ └── launchSettings.json │ └── Program.cs ├── AspireApp1.AppHost │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── AspireApp1.AppHost.csproj │ ├── Program.cs │ └── Properties │ │ └── launchSettings.json ├── DatabaseDeploy │ ├── scripts │ │ └── 001-WeatherForecast.sql │ ├── DatabaseDeploy.csproj │ └── Program.cs ├── AspireApp1.ServiceDefaults │ ├── AspireApp1.ServiceDefaults.csproj │ └── Extensions.cs └── HostedSqlServer + DbUp.sln ├── hostedss - ef ├── .gitignore ├── .aspire │ └── settings.json ├── AspireApp1.AppHost │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── AspireApp1.AppHost.csproj │ ├── Properties │ │ └── launchSettings.json │ └── Program.cs ├── WebApplication1 │ ├── WebApplication1.http │ ├── Properties │ │ └── launchSettings.json │ ├── WebApplication1.csproj │ ├── Migrations │ │ ├── 20250309201823_InitialCreate.cs │ │ ├── WeatherForecastContextModelSnapshot.cs │ │ └── 20250309201823_InitialCreate.Designer.cs │ └── Program.cs ├── AspireApp1.DatabaseMigrations │ ├── Properties │ │ └── launchSettings.json │ ├── Program.cs │ ├── AspireApp1.DatabaseMigrations.csproj │ └── Worker.cs ├── AspireApp1.ServiceDefaults │ ├── AspireApp1.ServiceDefaults.csproj │ └── Extensions.cs └── HostedSqlServer + EF.sln ├── base ├── .aspire │ └── settings.json ├── AspireApp1.AppHost │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Program.cs │ ├── AspireApp1.AppHost.csproj │ └── Properties │ │ └── launchSettings.json ├── WebApplication1 │ ├── WebApplication1.http │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── WebApplication1.csproj │ ├── Properties │ │ └── launchSettings.json │ └── Program.cs ├── AspireApp1.ServiceDefaults │ ├── AspireApp1.ServiceDefaults.csproj │ └── Extensions.cs └── Base.sln ├── hostedss - dbup - dab ├── .aspire │ └── settings.json ├── WebApplication1 │ ├── appsettings.Development.json │ ├── WebApplication1.http │ ├── appsettings.json │ ├── WebApplication1.csproj │ ├── Properties │ │ └── launchSettings.json │ └── Program.cs ├── AspireApp1.AppHost │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Program.cs │ ├── AspireApp1.AppHost.csproj │ ├── Properties │ │ └── launchSettings.json │ └── dab-config.json ├── DatabaseDeploy │ ├── scripts │ │ └── 001-WeatherForecast.sql │ ├── DatabaseDeploy.csproj │ └── Program.cs ├── AspireApp1.ServiceDefaults │ ├── AspireApp1.ServiceDefaults.csproj │ └── Extensions.cs └── HostedSqlServer + DbUp + DAB.sln ├── byoss ├── WebApplication1 │ ├── WebApplication1.http │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── WebApplication1.csproj │ ├── Properties │ │ └── launchSettings.json │ └── Program.cs ├── AspireApp1.AppHost │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Program.cs │ ├── AspireApp1.AppHost.csproj │ └── Properties │ │ └── launchSettings.json ├── AspireApp1.ServiceDefaults │ ├── AspireApp1.ServiceDefaults.csproj │ └── Extensions.cs └── BYOSS.sln ├── hostedss ├── AspireApp1.AppHost │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── AspireApp1.AppHost.csproj │ ├── Program.cs │ └── Properties │ │ └── launchSettings.json ├── WebApplication1 │ ├── WebApplication1.http │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── WebApplication1.csproj │ ├── Properties │ │ └── launchSettings.json │ └── Program.cs ├── AspireApp1.ServiceDefaults │ ├── AspireApp1.ServiceDefaults.csproj │ └── Extensions.cs └── HostedSqlServer.sln ├── CHANGELOG.md ├── hostedss - dbprj ├── WeatherDatabase │ ├── WeatherForecasts.sql │ ├── Script.PostDeployment.sql │ └── WeatherDatabase.sqlproj ├── WebApplication1 │ ├── appsettings.Development.json │ ├── WebApplication1.http │ ├── appsettings.json │ ├── WebApplication1.csproj │ ├── Properties │ │ └── launchSettings.json │ └── Program.cs ├── AspireApp1.AppHost │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── AspireApp1.AppHost.csproj │ ├── Program.cs │ └── Properties │ │ └── launchSettings.json ├── AspireApp1.ServiceDefaults │ ├── AspireApp1.ServiceDefaults.csproj │ └── Extensions.cs └── HostedSqlServer + DBPrj.sln ├── .github ├── CODE_OF_CONDUCT.md ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── LICENSE.md ├── CONTRIBUTING.md ├── README.md └── .gitignore /todo_app/.gitignore: -------------------------------------------------------------------------------- 1 | .azure 2 | -------------------------------------------------------------------------------- /hostedss - dbup/.gitignore: -------------------------------------------------------------------------------- 1 | .azure 2 | infra/ -------------------------------------------------------------------------------- /hostedss - ef/.gitignore: -------------------------------------------------------------------------------- 1 | .azure 2 | infra/ -------------------------------------------------------------------------------- /todo_app/.aspire/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "appHostPath": "../TodoApp.AppHost/TodoApp.AppHost.csproj" 3 | } -------------------------------------------------------------------------------- /base/.aspire/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "appHostPath": "../AspireApp1.AppHost/AspireApp1.AppHost.csproj" 3 | } -------------------------------------------------------------------------------- /hostedss - ef/.aspire/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "appHostPath": "../AspireApp1.AppHost/AspireApp1.AppHost.csproj" 3 | } -------------------------------------------------------------------------------- /hostedss - dbup - dab/.aspire/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "appHostPath": "../AspireApp1.AppHost/AspireApp1.AppHost.csproj" 3 | } -------------------------------------------------------------------------------- /todo_app/TodoApp.Database/Script.PreDeployment.sql: -------------------------------------------------------------------------------- 1 | -- This file contains SQL statements that will be executed before the build script. 2 | 3 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure-Samples/azure-sql-db-aspire/HEAD/todo_app/TodoApp.Frontend/public/favicon.ico -------------------------------------------------------------------------------- /base/AspireApp1.AppHost/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /base/WebApplication1/WebApplication1.http: -------------------------------------------------------------------------------- 1 | @WebApplication1_HostAddress = http://localhost:5146 2 | 3 | GET {{WebApplication1_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /base/WebApplication1/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /byoss/WebApplication1/WebApplication1.http: -------------------------------------------------------------------------------- 1 | @WebApplication1_HostAddress = http://localhost:5032 2 | 3 | GET {{WebApplication1_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /byoss/WebApplication1/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /byoss/AspireApp1.AppHost/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /hostedss/AspireApp1.AppHost/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /hostedss/WebApplication1/WebApplication1.http: -------------------------------------------------------------------------------- 1 | @WebApplication1_HostAddress = http://localhost:5032 2 | 3 | GET {{WebApplication1_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /hostedss/WebApplication1/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /todo_app/TodoApp.AppHost/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [project-title] Changelog 2 | 3 | 4 | # x.y.z (yyyy-mm-dd) 5 | 6 | *Features* 7 | * ... 8 | 9 | *Bug Fixes* 10 | * ... 11 | 12 | *Breaking Changes* 13 | * ... 14 | -------------------------------------------------------------------------------- /hostedss - dbprj/WeatherDatabase/WeatherForecasts.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE [dbo].[WeatherForecasts] 2 | ( 3 | [Id] INT NOT NULL PRIMARY KEY, 4 | [Date] DATE NOT NULL, 5 | [TemperatureC] INT NOT NULL 6 | ) 7 | GO 8 | -------------------------------------------------------------------------------- /hostedss - dbprj/WebApplication1/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /hostedss - dbup/WebApplication1/WebApplication1.http: -------------------------------------------------------------------------------- 1 | @WebApplication1_HostAddress = http://localhost:5032 2 | 3 | GET {{WebApplication1_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /hostedss - dbup/WebApplication1/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /hostedss - ef/AspireApp1.AppHost/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /hostedss - ef/WebApplication1/WebApplication1.http: -------------------------------------------------------------------------------- 1 | @WebApplication1_HostAddress = http://localhost:5032 2 | 3 | GET {{WebApplication1_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /hostedss - dbprj/AspireApp1.AppHost/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /hostedss - dbprj/WebApplication1/WebApplication1.http: -------------------------------------------------------------------------------- 1 | @WebApplication1_HostAddress = http://localhost:5000 2 | 3 | GET {{WebApplication1_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/WebApplication1/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /hostedss - dbup/AspireApp1.AppHost/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/AspireApp1.AppHost/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/WebApplication1/WebApplication1.http: -------------------------------------------------------------------------------- 1 | @WebApplication1_HostAddress = http://localhost:5032 2 | 3 | GET {{WebApplication1_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /base/WebApplication1/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /byoss/WebApplication1/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /hostedss/WebApplication1/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /hostedss - dbprj/WebApplication1/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /hostedss - dbup/WebApplication1/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/WebApplication1/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /base/AspireApp1.AppHost/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning", 6 | "Aspire.Hosting.Dcp": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /byoss/AspireApp1.AppHost/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning", 6 | "Aspire.Hosting.Dcp": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /hostedss/AspireApp1.AppHost/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning", 6 | "Aspire.Hosting.Dcp": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /todo_app/TodoApp.AppHost/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning", 6 | "Aspire.Hosting.Dcp": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /hostedss - ef/AspireApp1.AppHost/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning", 6 | "Aspire.Hosting.Dcp": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /hostedss - dbprj/AspireApp1.AppHost/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning", 6 | "Aspire.Hosting.Dcp": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /hostedss - dbup/AspireApp1.AppHost/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning", 6 | "Aspire.Hosting.Dcp": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/AspireApp1.AppHost/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning", 6 | "Aspire.Hosting.Dcp": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /hostedss - dbprj/WeatherDatabase/Script.PostDeployment.sql: -------------------------------------------------------------------------------- 1 | -- This file contains SQL statements that will be executed after the build script. 2 | TRUNCATE TABLE [dbo].[WeatherForecasts]; 3 | 4 | INSERT INTO [dbo].[WeatherForecasts] 5 | SELECT [value], DATEADD(day, [value], SYSDATETIME()), -20 + RAND(CONVERT(VARBINARY, NEWID())) * 75 FROM GENERATE_SERIES(1, 50); 6 | -------------------------------------------------------------------------------- /hostedss - ef/AspireApp1.DatabaseMigrations/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "AspireApp1.DatabaseMigrations": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "environmentVariables": { 8 | "DOTNET_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /hostedss - dbup/DatabaseDeploy/scripts/001-WeatherForecast.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE [dbo].[WeatherForecasts] 2 | ( 3 | [Id] INT NOT NULL PRIMARY KEY, 4 | [Date] DATE NOT NULL, 5 | [DegreesCelsius] INT NOT NULL 6 | ) 7 | GO 8 | 9 | INSERT INTO [dbo].[WeatherForecasts] 10 | SELECT [value], DATEADD(day, [value], SYSDATETIME()), -20 + RAND(CONVERT(VARBINARY, NEWID())) * 75 FROM GENERATE_SERIES(1, 50); 11 | GO 12 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/DatabaseDeploy/scripts/001-WeatherForecast.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE [dbo].[WeatherForecasts] 2 | ( 3 | [Id] INT NOT NULL PRIMARY KEY, 4 | [Date] DATE NOT NULL, 5 | [DegreesCelsius] INT NOT NULL 6 | ) 7 | GO 8 | 9 | INSERT INTO [dbo].[WeatherForecasts] 10 | SELECT [value], DATEADD(day, [value], SYSDATETIME()), -20 + RAND(CONVERT(VARBINARY, NEWID())) * 75 FROM GENERATE_SERIES(1, 50); 11 | GO 12 | -------------------------------------------------------------------------------- /base/WebApplication1/WebApplication1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Aspire Todo App Demo v1.0 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "todomvc-vue3-client", 3 | "version": "1.1.1", 4 | "scripts": { 5 | "start":"vite", 6 | "dev": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "dependencies": { 11 | "@aacassandra/vue3-progressbar": "^1.0.3", 12 | "vue": "^3.5.13" 13 | }, 14 | "devDependencies": { 15 | "@vitejs/plugin-vue": "^5.2.1", 16 | "vite": "^6.2.6", 17 | "git-describe": "^4.1.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /base/AspireApp1.AppHost/Program.cs: -------------------------------------------------------------------------------- 1 | var builder = DistributedApplication.CreateBuilder(args); 2 | 3 | builder.AddProject("web") 4 | .WithUrlForEndpoint("http", url => 5 | { 6 | url.DisplayText = "Forecast API (HTTP)"; 7 | url.Url += "/weatherforecast"; 8 | }) 9 | .WithUrlForEndpoint("https", url => 10 | { 11 | url.DisplayText = "Forecast API (HTTPS)"; 12 | url.Url += "/weatherforecast"; 13 | }) 14 | ; 15 | 16 | builder.Build().Run(); 17 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Frontend/src/styles/todo-custom.css: -------------------------------------------------------------------------------- 1 | .todoapp h2 { 2 | position: absolute; 3 | top: -40px; 4 | width: 100%; 5 | font-size: 20px; 6 | font-weight: bold; 7 | text-align: center; 8 | color: rgba(175, 47, 47, 0.15); 9 | padding-bottom: 20px; 10 | } 11 | 12 | .bottom { 13 | color: #dfdfdf 14 | } 15 | 16 | .loader { 17 | display: inline; 18 | } 19 | 20 | .drag { 21 | border-left-width: thick; 22 | border-left-style: solid; 23 | border-left-color: rgba(175, 47, 47, 0.15); 24 | } 25 | -------------------------------------------------------------------------------- /hostedss - ef/AspireApp1.DatabaseMigrations/Program.cs: -------------------------------------------------------------------------------- 1 | using AspireApp1.DatabaseMigrations; 2 | using WebApplication1; 3 | 4 | var builder = Host.CreateApplicationBuilder(args); 5 | 6 | builder.AddServiceDefaults(); 7 | builder.Services.AddHostedService(); 8 | 9 | builder.Services.AddOpenTelemetry() 10 | .WithTracing(tracing => tracing.AddSource("DatabaseMigrations")); 11 | 12 | builder.AddSqlServerDbContext(connectionName: "db"); 13 | 14 | var host = builder.Build(); 15 | 16 | host.Run(); 17 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Frontend/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import VueProgressBar from "@aacassandra/vue3-progressbar"; 4 | 5 | const options = { 6 | color: "#ffcf2c", 7 | failedColor: "#874b4b", 8 | thickness: "5px", 9 | transition: { 10 | speed: "0.1s", 11 | opacity: "0.6s", 12 | termination: 100, 13 | }, 14 | autoRevert: true, 15 | inverse: false, 16 | }; 17 | 18 | createApp(App) 19 | .use(VueProgressBar, options) 20 | .mount('#app') 21 | 22 | -------------------------------------------------------------------------------- /byoss/WebApplication1/WebApplication1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Database/dbo.todos.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE [dbo].[todos] 2 | ( 3 | [id] [uniqueidentifier] NOT NULL, 4 | [title] [nvarchar](1000) NOT NULL, 5 | [completed] [bit] NOT NULL, 6 | [owner_id] [varchar](128) NOT NULL, 7 | [position] INT NULL 8 | ) 9 | GO 10 | ALTER TABLE [dbo].[todos] ADD PRIMARY KEY NONCLUSTERED 11 | ( 12 | [id] ASC 13 | ) 14 | GO 15 | ALTER TABLE [dbo].[todos] ADD DEFAULT (newid()) FOR [id] 16 | GO 17 | ALTER TABLE [dbo].[todos] ADD DEFAULT ((0)) FOR [completed] 18 | GO 19 | ALTER TABLE [dbo].[todos] ADD DEFAULT ('public') FOR [owner_id] 20 | GO 21 | -------------------------------------------------------------------------------- /byoss/AspireApp1.AppHost/Program.cs: -------------------------------------------------------------------------------- 1 | var builder = DistributedApplication.CreateBuilder(args); 2 | 3 | var db = builder.AddConnectionString("db"); 4 | 5 | builder.AddProject("webapi") 6 | .WithUrlForEndpoint("http", url => 7 | { 8 | url.DisplayText = "Forecast API (HTTP)"; 9 | url.Url += "/weatherforecast"; 10 | }) 11 | .WithUrlForEndpoint("https", url => 12 | { 13 | url.DisplayText = "Forecast API (HTTPS)"; 14 | url.Url += "/weatherforecast"; 15 | }) 16 | .WithReference(db); 17 | ; 18 | 19 | builder.Build().Run(); 20 | -------------------------------------------------------------------------------- /hostedss - dbup/DatabaseDeploy/DatabaseDeploy.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net9.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/DatabaseDeploy/DatabaseDeploy.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net9.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /hostedss - dbup/DatabaseDeploy/Program.cs: -------------------------------------------------------------------------------- 1 | using DbUp; 2 | 3 | namespace DatabaseDeploy 4 | { 5 | internal class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | string connectionString = Environment.GetEnvironmentVariable("ConnectionStrings__db"); 10 | EnsureDatabase.For.SqlDatabase(connectionString); 11 | DeployChanges.To.SqlDatabase(connectionString) 12 | .WithScriptsFromFileSystem("./scripts") 13 | .LogToConsole() 14 | .Build() 15 | .PerformUpgrade(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hostedss/WebApplication1/WebApplication1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /hostedss - dbup/WebApplication1/WebApplication1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /hostedss - dbprj/WebApplication1/WebApplication1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/DatabaseDeploy/Program.cs: -------------------------------------------------------------------------------- 1 | using DbUp; 2 | 3 | namespace DatabaseDeploy 4 | { 5 | internal class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | string connectionString = Environment.GetEnvironmentVariable("ConnectionStrings__db") ?? string.Empty; 10 | EnsureDatabase.For.SqlDatabase(connectionString); 11 | DeployChanges.To.SqlDatabase(connectionString) 12 | .WithScriptsFromFileSystem("./scripts") 13 | .LogToConsole() 14 | .Build() 15 | .PerformUpgrade(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/WebApplication1/WebApplication1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /byoss/AspireApp1.AppHost/AspireApp1.AppHost.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Exe 7 | net9.0 8 | enable 9 | enable 10 | 2c343a00-3aab-423f-b3a2-2feabf216baa 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /hostedss - dbprj/WeatherDatabase/WeatherDatabase.sqlproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | WeatherDatabase 6 | {7EC12138-7EF4-4E0E-B79D-8216528A7A23} 7 | Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider 8 | 1033, CI 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /base/WebApplication1/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": false, 8 | "applicationUrl": "http://localhost:5146", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | }, 13 | "https": { 14 | "commandName": "Project", 15 | "dotnetRunMessages": true, 16 | "launchBrowser": false, 17 | "applicationUrl": "https://localhost:7103;http://localhost:5146", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /byoss/WebApplication1/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": false, 8 | "applicationUrl": "http://localhost:5032", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | }, 13 | "https": { 14 | "commandName": "Project", 15 | "dotnetRunMessages": true, 16 | "launchBrowser": false, 17 | "applicationUrl": "https://localhost:7218;http://localhost:5032", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/AspireApp1.AppHost/Program.cs: -------------------------------------------------------------------------------- 1 | var builder = DistributedApplication.CreateBuilder(args); 2 | 3 | var sqlSrv = builder.AddSqlServer("sqlsrv", port:1435) 4 | .WithLifetime(ContainerLifetime.Persistent); 5 | 6 | var db = sqlSrv.AddDatabase("db"); 7 | 8 | var dbDeploy = builder.AddProject("dbDeploy") 9 | .WithReference(db) 10 | .WaitFor(db); 11 | 12 | builder.AddDataAPIBuilder("dab") 13 | .WithImageTag("latest") 14 | .WithUrlForEndpoint("http", url => 15 | { 16 | url.DisplayText = "Forecast API (HTTP)"; 17 | url.Url += "/api/weatherforecasts"; 18 | }) 19 | .WithReference(db) 20 | .WaitFor(db) 21 | .WaitForCompletion(dbDeploy); 22 | 23 | builder.Build().Run(); 24 | -------------------------------------------------------------------------------- /hostedss/WebApplication1/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": false, 8 | "applicationUrl": "http://localhost:5032", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | }, 13 | "https": { 14 | "commandName": "Project", 15 | "dotnetRunMessages": true, 16 | "launchBrowser": false, 17 | "applicationUrl": "https://localhost:7218;http://localhost:5032", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /hostedss - dbprj/WebApplication1/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": false, 8 | "applicationUrl": "http://localhost:5032", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | }, 13 | "https": { 14 | "commandName": "Project", 15 | "dotnetRunMessages": true, 16 | "launchBrowser": false, 17 | "applicationUrl": "https://localhost:7218;http://localhost:5032", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /hostedss - dbup/WebApplication1/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": false, 8 | "applicationUrl": "http://localhost:5032", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | }, 13 | "https": { 14 | "commandName": "Project", 15 | "dotnetRunMessages": true, 16 | "launchBrowser": false, 17 | "applicationUrl": "https://localhost:7218;http://localhost:5032", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /hostedss - ef/WebApplication1/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": false, 8 | "applicationUrl": "http://localhost:5032", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | }, 13 | "https": { 14 | "commandName": "Project", 15 | "dotnetRunMessages": true, 16 | "launchBrowser": false, 17 | "applicationUrl": "https://localhost:7218;http://localhost:5032", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/WebApplication1/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": false, 8 | "applicationUrl": "http://localhost:5032", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | }, 13 | "https": { 14 | "commandName": "Project", 15 | "dotnetRunMessages": true, 16 | "launchBrowser": false, 17 | "applicationUrl": "https://localhost:7218;http://localhost:5032", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Frontend/README.md: -------------------------------------------------------------------------------- 1 | # client 2 | 3 | This template should help get you started developing with Vue 3 in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). 8 | 9 | ## Customize configuration 10 | 11 | See [Vite Configuration Reference](https://vitejs.dev/config/). 12 | 13 | ## Project Setup 14 | 15 | ```sh 16 | npm install 17 | ``` 18 | 19 | ### Compile and Hot-Reload for Development 20 | 21 | ```sh 22 | npm run dev 23 | ``` 24 | 25 | ### Compile and Minify for Production 26 | 27 | ```sh 28 | npm run build 29 | ``` 30 | -------------------------------------------------------------------------------- /hostedss/AspireApp1.AppHost/AspireApp1.AppHost.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Exe 7 | net9.0 8 | enable 9 | enable 10 | 0d58b20c-2afc-4388-a733-4c2057e0a27b 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Database/TodoDB.sqlproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TodoDB 6 | {205974aa-6e03-4e54-b684-782e0a9a56ed} 7 | Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider 8 | 1033, CI 9 | True 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /base/AspireApp1.AppHost/AspireApp1.AppHost.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Exe 7 | net9.0 8 | enable 9 | enable 10 | 8b26f804-ba48-4952-b942-70b35dc00e22 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /hostedss/AspireApp1.AppHost/Program.cs: -------------------------------------------------------------------------------- 1 | var builder = DistributedApplication.CreateBuilder(args); 2 | 3 | var sqlPassword = builder.AddParameter("sqlsrv-password"); 4 | 5 | var sqlSrv = builder.AddSqlServer("sqlsrv", sqlPassword, port:1435) 6 | .WithLifetime(ContainerLifetime.Persistent); 7 | 8 | //var db = sqlSrv.AddDatabase("db"); 9 | var db = sqlSrv.AddDatabase("db", databaseName: "tempdb"); 10 | 11 | builder.AddProject("webapi") 12 | .WithUrlForEndpoint("http", url => 13 | { 14 | url.DisplayText = "Forecast API (HTTP)"; 15 | url.Url += "/weatherforecast"; 16 | }) 17 | .WithUrlForEndpoint("https", url => 18 | { 19 | url.DisplayText = "Forecast API (HTTPS)"; 20 | url.Url += "/weatherforecast"; 21 | }) 22 | .WithReference(db) 23 | .WaitFor(db); 24 | 25 | builder.Build().Run(); 26 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Frontend/src/App.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 25 | 26 | -------------------------------------------------------------------------------- /hostedss - ef/AspireApp1.DatabaseMigrations/AspireApp1.DatabaseMigrations.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | dotnet-AspireApp1.DatabaseMigrations-05ddc414-b52a-4096-8849-02c132456af4 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Frontend/vite.config.js: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from 'node:url' 2 | 3 | import { defineConfig } from 'vite' 4 | import vue from '@vitejs/plugin-vue' 5 | 6 | const { gitDescribeSync } = require('git-describe'); 7 | 8 | process.env.VITE_APP_VERSION = require('./package.json').version 9 | process.env.VITE_APP_GIT_HASH = gitDescribeSync().hash 10 | 11 | // https://vitejs.dev/config/ 12 | export default defineConfig({ 13 | plugins: [vue()], 14 | resolve: { 15 | alias: { 16 | '@': fileURLToPath(new URL('./src', import.meta.url)) 17 | } 18 | }, 19 | server: { 20 | host: true, 21 | port: parseInt(process.env.PORT ?? "5173"), 22 | proxy: { 23 | '/api': { 24 | target: process.env.services__dab__https__0 || process.env.services__dab__http__0, 25 | changeOrigin: true, 26 | secure: false 27 | } 28 | } 29 | } 30 | }) 31 | -------------------------------------------------------------------------------- /hostedss - dbup/AspireApp1.AppHost/AspireApp1.AppHost.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Exe 7 | net9.0 8 | enable 9 | enable 10 | 33685a5e-74bb-4f05-9881-601cf33cad11 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /hostedss - ef/AspireApp1.AppHost/AspireApp1.AppHost.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Exe 7 | net9.0 8 | enable 9 | enable 10 | 67a3978e-b32f-4bc0-b301-85286f5bc810 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /hostedss - dbprj/AspireApp1.AppHost/AspireApp1.AppHost.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Exe 7 | net9.0 8 | enable 9 | enable 10 | 881669bd-202c-44f1-a97c-04b18b065290 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /hostedss - dbprj/AspireApp1.AppHost/Program.cs: -------------------------------------------------------------------------------- 1 | var builder = DistributedApplication.CreateBuilder(args); 2 | 3 | var sqlSrv = builder.AddSqlServer("sqlsrv", port: 1435) 4 | .WithLifetime(ContainerLifetime.Persistent); 5 | 6 | var db = sqlSrv.AddDatabase("db"); 7 | 8 | var dbPrj = builder.AddSqlProject("dbPrj") 9 | .WithConfigureDacDeployOptions((options) => options.AllowTableRecreation = false) 10 | .WithReference(db) 11 | .WaitFor(db); 12 | 13 | builder.AddProject("webapi") 14 | .WithUrlForEndpoint("http", url => 15 | { 16 | url.DisplayText = "Forecast API (HTTP)"; 17 | url.Url += "/weatherforecast"; 18 | }) 19 | .WithUrlForEndpoint("https", url => 20 | { 21 | url.DisplayText = "Forecast API (HTTPS)"; 22 | url.Url += "/weatherforecast"; 23 | }) 24 | .WithReference(db) 25 | .WaitFor(db) 26 | .WaitForCompletion(dbPrj); 27 | 28 | builder.Build().Run(); 29 | -------------------------------------------------------------------------------- /hostedss - ef/WebApplication1/WebApplication1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | runtime; build; native; contentfiles; analyzers; buildtransitive 14 | all 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /base/WebApplication1/Program.cs: -------------------------------------------------------------------------------- 1 | var builder = WebApplication.CreateBuilder(args); 2 | 3 | // Add services to the container. 4 | builder.AddServiceDefaults(); 5 | 6 | var app = builder.Build(); 7 | 8 | // Configure the HTTP request pipeline. 9 | 10 | app.UseHttpsRedirection(); 11 | 12 | var summaries = new[] 13 | { 14 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 15 | }; 16 | 17 | app.MapGet("/weatherforecast", () => 18 | { 19 | var forecast = Enumerable.Range(1, 5).Select(index => 20 | new WeatherForecast 21 | ( 22 | DateOnly.FromDateTime(DateTime.Now.AddDays(index)), 23 | Random.Shared.Next(-20, 55), 24 | summaries[Random.Shared.Next(summaries.Length)] 25 | )) 26 | .ToArray(); 27 | return forecast; 28 | }); 29 | 30 | app.Run(); 31 | 32 | internal record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) 33 | { 34 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 35 | } 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 4 | > Please provide us with the following information: 5 | > --------------------------------------------------------------- 6 | 7 | ### This issue is for a: (mark with an `x`) 8 | ``` 9 | - [ ] bug report -> please search issues before submitting 10 | - [ ] feature request 11 | - [ ] documentation issue or request 12 | - [ ] regression (a behavior that used to work and stopped in a new release) 13 | ``` 14 | 15 | ### Minimal steps to reproduce 16 | > 17 | 18 | ### Any log messages given by the failure 19 | > 20 | 21 | ### Expected/desired behavior 22 | > 23 | 24 | ### OS and Version? 25 | > Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?) 26 | 27 | ### Versions 28 | > 29 | 30 | ### Mention any other details that might be useful 31 | 32 | > --------------------------------------------------------------- 33 | > Thanks! We'll be in touch soon. 34 | -------------------------------------------------------------------------------- /hostedss - dbup/AspireApp1.AppHost/Program.cs: -------------------------------------------------------------------------------- 1 | var builder = DistributedApplication.CreateBuilder(args); 2 | 3 | // If you plan to use SQL Server 4 | // var sqlSrv = builder.AddSqlServer("sqlsrv", port:1435). 5 | // WithLifetime(ContainerLifetime.Persistent); 6 | 7 | // If you plan to deploy in Azure SQL Server 8 | var sqlSrv = builder.AddAzureSqlServer("sqlsrv").RunAsContainer(); 9 | 10 | var db = sqlSrv.AddDatabase("db"); 11 | 12 | var dbDeploy = builder.AddProject("dbDeploy") 13 | .WithReference(db) 14 | .WaitFor(db); 15 | 16 | builder.AddProject("webapi") 17 | .WithUrlForEndpoint("http", url => 18 | { 19 | url.DisplayText = "Forecast API (HTTP)"; 20 | url.Url += "/weatherforecast"; 21 | }) 22 | .WithUrlForEndpoint("https", url => 23 | { 24 | url.DisplayText = "Forecast API (HTTPS)"; 25 | url.Url += "/weatherforecast"; 26 | }) 27 | .WithReference(db) 28 | .WaitFor(db) 29 | .WaitForCompletion(dbDeploy); 30 | 31 | builder.Build().Run(); 32 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/AspireApp1.AppHost/AspireApp1.AppHost.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Exe 7 | net9.0 8 | enable 9 | enable 10 | 0ce82d6e-8da1-4cfc-81d2-b99ae1039186 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | PreserveNewest 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /todo_app/TodoApp.ServiceDefaults/TodoApp.ServiceDefaults.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /base/AspireApp1.ServiceDefaults/AspireApp1.ServiceDefaults.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /byoss/AspireApp1.ServiceDefaults/AspireApp1.ServiceDefaults.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /hostedss/AspireApp1.ServiceDefaults/AspireApp1.ServiceDefaults.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /hostedss - dbprj/AspireApp1.ServiceDefaults/AspireApp1.ServiceDefaults.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /hostedss - dbup/AspireApp1.ServiceDefaults/AspireApp1.ServiceDefaults.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /hostedss - ef/AspireApp1.ServiceDefaults/AspireApp1.ServiceDefaults.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/AspireApp1.ServiceDefaults/AspireApp1.ServiceDefaults.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Purpose 2 | 3 | * ... 4 | 5 | ## Does this introduce a breaking change? 6 | 7 | ``` 8 | [ ] Yes 9 | [ ] No 10 | ``` 11 | 12 | ## Pull Request Type 13 | What kind of change does this Pull Request introduce? 14 | 15 | 16 | ``` 17 | [ ] Bugfix 18 | [ ] Feature 19 | [ ] Code style update (formatting, local variables) 20 | [ ] Refactoring (no functional changes, no api changes) 21 | [ ] Documentation content changes 22 | [ ] Other... Please describe: 23 | ``` 24 | 25 | ## How to Test 26 | * Get the code 27 | 28 | ``` 29 | git clone [repo-address] 30 | cd [repo-name] 31 | git checkout [branch-name] 32 | npm install 33 | ``` 34 | 35 | * Test the code 36 | 37 | ``` 38 | ``` 39 | 40 | ## What to Check 41 | Verify that the following are valid 42 | * ... 43 | 44 | ## Other Information 45 | -------------------------------------------------------------------------------- /base/AspireApp1.AppHost/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "https": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": true, 8 | "applicationUrl": "https://localhost:17205;http://localhost:15015", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development", 11 | "DOTNET_ENVIRONMENT": "Development", 12 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21114", 13 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22292" 14 | } 15 | }, 16 | "http": { 17 | "commandName": "Project", 18 | "dotnetRunMessages": true, 19 | "launchBrowser": true, 20 | "applicationUrl": "http://localhost:15015", 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development", 23 | "DOTNET_ENVIRONMENT": "Development", 24 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19019", 25 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20223" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /byoss/AspireApp1.AppHost/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "https": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": true, 8 | "applicationUrl": "https://localhost:17044;http://localhost:15040", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development", 11 | "DOTNET_ENVIRONMENT": "Development", 12 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21215", 13 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22105" 14 | } 15 | }, 16 | "http": { 17 | "commandName": "Project", 18 | "dotnetRunMessages": true, 19 | "launchBrowser": true, 20 | "applicationUrl": "http://localhost:15040", 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development", 23 | "DOTNET_ENVIRONMENT": "Development", 24 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19182", 25 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20169" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /hostedss/AspireApp1.AppHost/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "https": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": true, 8 | "applicationUrl": "https://localhost:17044;http://localhost:15040", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development", 11 | "DOTNET_ENVIRONMENT": "Development", 12 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21215", 13 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22105" 14 | } 15 | }, 16 | "http": { 17 | "commandName": "Project", 18 | "dotnetRunMessages": true, 19 | "launchBrowser": true, 20 | "applicationUrl": "http://localhost:15040", 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development", 23 | "DOTNET_ENVIRONMENT": "Development", 24 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19182", 25 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20169" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /todo_app/TodoApp.AppHost/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "https": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": true, 8 | "applicationUrl": "https://localhost:17044;http://localhost:15085", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development", 11 | "DOTNET_ENVIRONMENT": "Development", 12 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21055", 13 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22166" 14 | } 15 | }, 16 | "http": { 17 | "commandName": "Project", 18 | "dotnetRunMessages": true, 19 | "launchBrowser": true, 20 | "applicationUrl": "http://localhost:15085", 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development", 23 | "DOTNET_ENVIRONMENT": "Development", 24 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19189", 25 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20267" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /hostedss - ef/AspireApp1.AppHost/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "https": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": true, 8 | "applicationUrl": "https://localhost:17044;http://localhost:15040", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development", 11 | "DOTNET_ENVIRONMENT": "Development", 12 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21215", 13 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22105" 14 | } 15 | }, 16 | "http": { 17 | "commandName": "Project", 18 | "dotnetRunMessages": true, 19 | "launchBrowser": true, 20 | "applicationUrl": "http://localhost:15040", 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development", 23 | "DOTNET_ENVIRONMENT": "Development", 24 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19182", 25 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20169" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /hostedss - dbprj/AspireApp1.AppHost/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "https": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": true, 8 | "applicationUrl": "https://localhost:17044;http://localhost:15040", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development", 11 | "DOTNET_ENVIRONMENT": "Development", 12 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21215", 13 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22105" 14 | } 15 | }, 16 | "http": { 17 | "commandName": "Project", 18 | "dotnetRunMessages": true, 19 | "launchBrowser": true, 20 | "applicationUrl": "http://localhost:15040", 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development", 23 | "DOTNET_ENVIRONMENT": "Development", 24 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19182", 25 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20169" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /hostedss - dbup/AspireApp1.AppHost/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "https": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": true, 8 | "applicationUrl": "https://localhost:17044;http://localhost:15040", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development", 11 | "DOTNET_ENVIRONMENT": "Development", 12 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21215", 13 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22105" 14 | } 15 | }, 16 | "http": { 17 | "commandName": "Project", 18 | "dotnetRunMessages": true, 19 | "launchBrowser": true, 20 | "applicationUrl": "http://localhost:15040", 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development", 23 | "DOTNET_ENVIRONMENT": "Development", 24 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19182", 25 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20169" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /hostedss - ef/AspireApp1.AppHost/Program.cs: -------------------------------------------------------------------------------- 1 | using Azure.Provisioning.Sql; 2 | 3 | var builder = DistributedApplication.CreateBuilder(args); 4 | 5 | // If you plan to use SQL Server 6 | // var sqlSrv = builder.AddSqlServer("sqlsrv", port:1435). 7 | // WithLifetime(ContainerLifetime.Persistent); 8 | 9 | // If you plan to deploy in Azure SQL Server using the free Azure SQL DB offer 10 | var sqlSrv = builder.AddAzureSqlServer("sqlsrv") 11 | .RunAsContainer(); 12 | 13 | var db = sqlSrv.AddDatabase("db", "aspiredb"); 14 | 15 | var dbMigrate = builder.AddProject("dbmigrate") 16 | .WithReference(db) 17 | .WaitFor(db); 18 | 19 | builder.AddProject("webapi") 20 | .WithUrlForEndpoint("http", url => 21 | { 22 | url.DisplayText = "Forecast API (HTTP)"; 23 | url.Url += "/weatherforecast"; 24 | }) 25 | .WithUrlForEndpoint("https", url => 26 | { 27 | url.DisplayText = "Forecast API (HTTPS)"; 28 | url.Url += "/weatherforecast"; 29 | }) 30 | .WithReference(db) 31 | .WaitFor(db) 32 | .WaitForCompletion(dbMigrate); 33 | 34 | builder.Build().Run(); 35 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/AspireApp1.AppHost/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "https": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": true, 8 | "applicationUrl": "https://localhost:17044;http://localhost:15040", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development", 11 | "DOTNET_ENVIRONMENT": "Development", 12 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21215", 13 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22105" 14 | } 15 | }, 16 | "http": { 17 | "commandName": "Project", 18 | "dotnetRunMessages": true, 19 | "launchBrowser": true, 20 | "applicationUrl": "http://localhost:15040", 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development", 23 | "DOTNET_ENVIRONMENT": "Development", 24 | "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19182", 25 | "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20169" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Frontend/src/components/UserInfo.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /todo_app/TodoApp.AppHost/Program.cs: -------------------------------------------------------------------------------- 1 | var builder = DistributedApplication.CreateBuilder(args); 2 | 3 | // This is implictly there already, no need to manually add it 4 | // builder.AddParameter("sqlsrv-password"); 5 | 6 | // SQL Server 7 | var sqlSrv = builder.AddSqlServer("sqlsrv", port: 1435) 8 | .WithLifetime(ContainerLifetime.Persistent); 9 | 10 | // Azure SQL 11 | // var sqlSrv = builder.AddAzureSqlServer("sql") 12 | // .RunAsContainer(); 13 | 14 | var sqlDb = sqlSrv.AddDatabase("aspiretodo"); 15 | 16 | var dbPrj = builder.AddSqlProject("tododb") 17 | .WithReference(sqlDb) 18 | .WaitFor(sqlDb); 19 | 20 | var dab = builder.AddDataAPIBuilder("dab") 21 | .WithImageTag("latest") 22 | .WithUrlForEndpoint("http", url => 23 | { 24 | url.DisplayText = "Swagger UI"; 25 | url.Url += "/swagger"; 26 | }) 27 | .WithReference(sqlDb) 28 | .WaitFor(sqlDb) 29 | .WaitForCompletion(dbPrj); 30 | 31 | builder.AddNpmApp("frontend", "../TodoApp.Frontend") 32 | .WithReference(dab) 33 | .WaitFor(dab) 34 | .WithHttpEndpoint(env: "PORT") 35 | .WithExternalHttpEndpoints(); 36 | 37 | builder.Build().Run(); 38 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE -------------------------------------------------------------------------------- /hostedss - ef/WebApplication1/Migrations/20250309201823_InitialCreate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | 4 | #nullable disable 5 | 6 | namespace WebApplication1.Migrations 7 | { 8 | /// 9 | public partial class InitialCreate : Migration 10 | { 11 | /// 12 | protected override void Up(MigrationBuilder migrationBuilder) 13 | { 14 | migrationBuilder.CreateTable( 15 | name: "WeatherForecasts", 16 | columns: table => new 17 | { 18 | Id = table.Column(type: "int", nullable: false) 19 | .Annotation("SqlServer:Identity", "1, 1"), 20 | Date = table.Column(type: "date", nullable: false), 21 | TemperatureC = table.Column(type: "int", nullable: false) 22 | }, 23 | constraints: table => 24 | { 25 | table.PrimaryKey("PK_WeatherForecasts", x => x.Id); 26 | }); 27 | } 28 | 29 | /// 30 | protected override void Down(MigrationBuilder migrationBuilder) 31 | { 32 | migrationBuilder.DropTable( 33 | name: "WeatherForecasts"); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Database/Script.PostDeployment.sql: -------------------------------------------------------------------------------- 1 | -- This file contains SQL statements that will be executed after the build script. 2 | 3 | -- Create application user 4 | if (serverproperty('Edition') = 'SQL Azure') begin 5 | 6 | if not exists (select * from sys.database_principals where [type] in ('E', 'S') and [name] = 'todo_dab_user') 7 | begin 8 | create user [todo_dab_user] with password = 'rANd0m_PAzzw0rd!' 9 | alter role db_owner add member [todo_dab_user] 10 | end 11 | 12 | end 13 | 14 | -- Insert sample data 15 | delete from dbo.todos where id in 16 | ( 17 | '00000000-0000-0000-0000-000000000001', 18 | '00000000-0000-0000-0000-000000000002', 19 | '00000000-0000-0000-0000-000000000003', 20 | '00000000-0000-0000-0000-000000000004', 21 | '00000000-0000-0000-0000-000000000005' 22 | ); 23 | insert into dbo.todos 24 | ( 25 | [id], 26 | [title], 27 | [completed], 28 | [owner_id], 29 | [position] 30 | ) 31 | values 32 | ('00000000-0000-0000-0000-000000000001', N'Hello world', 0, 'public', 1), 33 | ('00000000-0000-0000-0000-000000000002', N'This is done', 1, 'public', 2), 34 | ('00000000-0000-0000-0000-000000000003', N'And this is not done (yet!)', 0, 'public', 4), 35 | ('00000000-0000-0000-0000-000000000004', N'This is a ☆☆☆☆☆ tool!', 0, 'public', 3), 36 | ('00000000-0000-0000-0000-000000000005', N'Add support for sorting', 1, 'public', 5) 37 | ; 38 | -------------------------------------------------------------------------------- /hostedss - ef/WebApplication1/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | var builder = WebApplication.CreateBuilder(args); 4 | 5 | // Add services to the container. 6 | builder.AddServiceDefaults(); 7 | 8 | // Add DB contenxt from Aspire 9 | builder.AddSqlServerDbContext(connectionName: "db"); 10 | 11 | var app = builder.Build(); 12 | 13 | // Configure the HTTP request pipeline. 14 | 15 | app.UseHttpsRedirection(); 16 | 17 | app.MapGet("/weatherforecast", (WeatherForecastContext context) => 18 | { 19 | return context.WeatherForecasts.Take(10).ToList(); 20 | }); 21 | 22 | app.Run(); 23 | 24 | public class WeatherForecastData 25 | { 26 | private string[] summaries = { 27 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 28 | }; 29 | 30 | public int Id { get; set; } 31 | public DateOnly Date { get; set; } 32 | public int TemperatureC { get; set; } 33 | public string Summary => summaries[this.Id % summaries.Length]; 34 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 35 | } 36 | 37 | public class WeatherForecastContext(DbContextOptions options) : DbContext(options) { 38 | public DbSet WeatherForecasts { get; set; } 39 | 40 | protected override void OnModelCreating(ModelBuilder modelBuilder) 41 | { 42 | modelBuilder.Entity() 43 | .Property(e => e.Id) 44 | .UseIdentityColumn(); 45 | } 46 | } -------------------------------------------------------------------------------- /hostedss - dbup - dab/AspireApp1.AppHost/dab-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.4.26/dab.draft.schema.json", 3 | "data-source": { 4 | "database-type": "mssql", 5 | "connection-string": "@env('ConnectionStrings__db')", 6 | "options": { 7 | "set-session-context": false 8 | } 9 | }, 10 | "runtime": { 11 | "rest": { 12 | "enabled": true, 13 | "path": "/api", 14 | "request-body-strict": true 15 | }, 16 | "graphql": { 17 | "enabled": true, 18 | "path": "/graphql", 19 | "allow-introspection": true 20 | }, 21 | "host": { 22 | "cors": { 23 | "origins": [], 24 | "allow-credentials": false 25 | }, 26 | "authentication": { 27 | "provider": "StaticWebApps" 28 | }, 29 | "mode": "development" 30 | } 31 | }, 32 | "entities": { 33 | "WeatherForecast": { 34 | "source": { 35 | "object": "dbo.WeatherForecasts", 36 | "type": "table" 37 | }, 38 | "graphql": { 39 | "enabled": true, 40 | "type": { 41 | "singular": "WeatherForecast", 42 | "plural": "WeatherForecasts" 43 | } 44 | }, 45 | "rest": { 46 | "enabled": true, 47 | "path": "weatherforecasts" 48 | }, 49 | "permissions": [ 50 | { 51 | "role": "anonymous", 52 | "actions": [ 53 | { 54 | "action": "*" 55 | } 56 | ] 57 | } 58 | ] 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /hostedss - dbprj/WebApplication1/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Data.SqlClient; 2 | using System; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | builder.AddServiceDefaults(); 8 | 9 | builder.AddSqlServerClient(connectionName: "db"); 10 | 11 | var app = builder.Build(); 12 | 13 | // Configure the HTTP request pipeline. 14 | 15 | app.UseHttpsRedirection(); 16 | 17 | var summaries = new[] 18 | { 19 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 20 | }; 21 | 22 | app.MapGet("/weatherforecast", (SqlConnection conn) => 23 | { 24 | var results = new List(); 25 | 26 | using (conn) 27 | { 28 | conn.Open(); 29 | using (var cmd = new SqlCommand("SELECT TOP(10) [Id], [Date], [TemperatureC] FROM [dbo].[WeatherForecasts]", conn)) 30 | { 31 | using (var reader = cmd.ExecuteReader()) 32 | { 33 | while (reader.Read()) 34 | { 35 | var wf = new WeatherForecast( 36 | DateOnly.FromDateTime(reader.GetDateTime(1)), 37 | reader.GetInt32(2), 38 | summaries[reader.GetInt32(0) % summaries.Length] 39 | ); 40 | 41 | results.Add(wf); 42 | } 43 | } 44 | } 45 | } 46 | 47 | return results; 48 | }); 49 | 50 | app.Run(); 51 | 52 | internal record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) 53 | { 54 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 55 | } 56 | -------------------------------------------------------------------------------- /hostedss - dbup/WebApplication1/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Data.SqlClient; 2 | using System; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | builder.AddServiceDefaults(); 8 | 9 | builder.AddSqlServerClient(connectionName: "db"); 10 | 11 | var app = builder.Build(); 12 | 13 | // Configure the HTTP request pipeline. 14 | 15 | app.UseHttpsRedirection(); 16 | 17 | var summaries = new[] 18 | { 19 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 20 | }; 21 | 22 | app.MapGet("/weatherforecast", (SqlConnection conn) => 23 | { 24 | var results = new List(); 25 | 26 | using (conn) 27 | { 28 | conn.Open(); 29 | using (var cmd = new SqlCommand("SELECT TOP(10) [Id], [Date], [DegreesCelsius] FROM [dbo].[WeatherForecasts]", conn)) 30 | { 31 | using (var reader = cmd.ExecuteReader()) 32 | { 33 | while (reader.Read()) 34 | { 35 | var wf = new WeatherForecast( 36 | DateOnly.FromDateTime(reader.GetDateTime(1)), 37 | reader.GetInt32(2), 38 | summaries[reader.GetInt32(0) % summaries.Length] 39 | ); 40 | 41 | results.Add(wf); 42 | } 43 | } 44 | } 45 | } 46 | 47 | return results; 48 | }); 49 | 50 | app.Run(); 51 | 52 | internal record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) 53 | { 54 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 55 | } 56 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/WebApplication1/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Data.SqlClient; 2 | using System; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | builder.AddServiceDefaults(); 8 | 9 | builder.AddSqlServerClient(connectionName: "db"); 10 | 11 | var app = builder.Build(); 12 | 13 | // Configure the HTTP request pipeline. 14 | 15 | app.UseHttpsRedirection(); 16 | 17 | var summaries = new[] 18 | { 19 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 20 | }; 21 | 22 | app.MapGet("/weatherforecast", (SqlConnection conn) => 23 | { 24 | var results = new List(); 25 | 26 | using (conn) 27 | { 28 | conn.Open(); 29 | using (var cmd = new SqlCommand("SELECT TOP(10) [Id], [Date], [DegreesCelsius] FROM [dbo].[WeatherForecasts]", conn)) 30 | { 31 | using (var reader = cmd.ExecuteReader()) 32 | { 33 | while (reader.Read()) 34 | { 35 | var wf = new WeatherForecast( 36 | DateOnly.FromDateTime(reader.GetDateTime(1)), 37 | reader.GetInt32(2), 38 | summaries[reader.GetInt32(0) % summaries.Length] 39 | ); 40 | 41 | results.Add(wf); 42 | } 43 | } 44 | } 45 | } 46 | 47 | return results; 48 | }); 49 | 50 | app.Run(); 51 | 52 | internal record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) 53 | { 54 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 55 | } 56 | -------------------------------------------------------------------------------- /byoss/WebApplication1/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Data.SqlClient; 2 | 3 | var builder = WebApplication.CreateBuilder(args); 4 | 5 | // Add services to the container. 6 | builder.AddServiceDefaults(); 7 | 8 | var app = builder.Build(); 9 | 10 | // Configure the HTTP request pipeline. 11 | 12 | app.UseHttpsRedirection(); 13 | 14 | var summaries = new[] 15 | { 16 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 17 | }; 18 | 19 | app.MapGet("/weatherforecast", () => 20 | { 21 | var connectionString = Environment.GetEnvironmentVariable("ConnectionStrings__db"); 22 | 23 | var results = new List(); 24 | 25 | using (var conn = new SqlConnection(connectionString)) 26 | { 27 | conn.Open(); 28 | using (var cmd = new SqlCommand("select [value] from generate_series(1,10)", conn)) 29 | { 30 | using (var reader = cmd.ExecuteReader()) 31 | { 32 | while (reader.Read()) 33 | { 34 | var wf = new WeatherForecast( 35 | DateOnly.FromDateTime(DateTime.Now.AddDays(reader.GetInt32(0))), 36 | Random.Shared.Next(-20, 55), 37 | summaries[Random.Shared.Next(summaries.Length)] 38 | ); 39 | 40 | results.Add(wf); 41 | } 42 | } 43 | } 44 | } 45 | 46 | return results; 47 | }); 48 | 49 | app.Run(); 50 | 51 | internal record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) 52 | { 53 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 54 | } 55 | -------------------------------------------------------------------------------- /hostedss - ef/WebApplication1/Migrations/WeatherForecastContextModelSnapshot.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using Microsoft.EntityFrameworkCore; 4 | using Microsoft.EntityFrameworkCore.Infrastructure; 5 | using Microsoft.EntityFrameworkCore.Metadata; 6 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 7 | 8 | #nullable disable 9 | 10 | namespace WebApplication1.Migrations 11 | { 12 | [DbContext(typeof(WeatherForecastContext))] 13 | partial class WeatherForecastContextModelSnapshot : ModelSnapshot 14 | { 15 | protected override void BuildModel(ModelBuilder modelBuilder) 16 | { 17 | #pragma warning disable 612, 618 18 | modelBuilder 19 | .HasAnnotation("ProductVersion", "9.0.2") 20 | .HasAnnotation("Relational:MaxIdentifierLength", 128); 21 | 22 | SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); 23 | 24 | modelBuilder.Entity("WeatherForecastData", b => 25 | { 26 | b.Property("Id") 27 | .ValueGeneratedOnAdd() 28 | .HasColumnType("int"); 29 | 30 | SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); 31 | 32 | b.Property("Date") 33 | .HasColumnType("date"); 34 | 35 | b.Property("TemperatureC") 36 | .HasColumnType("int"); 37 | 38 | b.HasKey("Id"); 39 | 40 | b.ToTable("WeatherForecasts"); 41 | }); 42 | #pragma warning restore 612, 618 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /hostedss/WebApplication1/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Data.SqlClient; 2 | using System; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | builder.AddServiceDefaults(); 8 | 9 | var app = builder.Build(); 10 | 11 | // Configure the HTTP request pipeline. 12 | 13 | app.UseHttpsRedirection(); 14 | 15 | var summaries = new[] 16 | { 17 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 18 | }; 19 | 20 | app.MapGet("/weatherforecast", () => 21 | { 22 | var connectionString = Environment.GetEnvironmentVariable("ConnectionStrings__db"); 23 | 24 | var results = new List(); 25 | 26 | using (var conn = new SqlConnection(connectionString)) 27 | { 28 | conn.Open(); 29 | using (var cmd = new SqlCommand("select [value] from generate_series(1,5)", conn)) 30 | { 31 | using (var reader = cmd.ExecuteReader()) 32 | { 33 | while (reader.Read()) 34 | { 35 | var wf = new WeatherForecast( 36 | DateOnly.FromDateTime(DateTime.Now.AddDays(reader.GetInt32(0))), 37 | Random.Shared.Next(-20, 55), 38 | summaries[Random.Shared.Next(summaries.Length)] 39 | ); 40 | 41 | results.Add(wf); 42 | } 43 | } 44 | } 45 | } 46 | 47 | return results; 48 | }); 49 | 50 | app.Run(); 51 | 52 | internal record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) 53 | { 54 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 55 | } 56 | -------------------------------------------------------------------------------- /todo_app/TodoApp.AppHost/dab-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.4.26/dab.draft.schema.json", 3 | "data-source": { 4 | "database-type": "mssql", 5 | "connection-string": "@env('ConnectionStrings__aspiretodo')", 6 | "options": { 7 | "set-session-context": false 8 | } 9 | }, 10 | "runtime": { 11 | "rest": { 12 | "enabled": true, 13 | "path": "/api", 14 | "request-body-strict": false 15 | }, 16 | "graphql": { 17 | "enabled": true, 18 | "path": "/graphql", 19 | "allow-introspection": true 20 | }, 21 | "host": { 22 | "cors": { 23 | "origins": [], 24 | "allow-credentials": false 25 | }, 26 | "authentication": { 27 | "provider": "StaticWebApps" 28 | }, 29 | "mode": "development" 30 | } 31 | }, 32 | "entities": { 33 | "Todo": { 34 | "source": "dbo.todos", 35 | "rest": { 36 | "path": "todo" 37 | }, 38 | "permissions": [ 39 | { 40 | "role": "anonymous", 41 | "actions": [ 42 | { 43 | "action": "*", 44 | "policy": { 45 | "database": "@item.owner_id eq 'public'" 46 | } 47 | } 48 | ] 49 | }, 50 | { 51 | "role": "authenticated", 52 | "actions": [ 53 | { 54 | "action": "*", 55 | "policy": { 56 | "database": "@item.owner_id eq @claims.userId" 57 | } 58 | } 59 | ] 60 | } 61 | ], 62 | "mappings": { 63 | "position": "order" 64 | } 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /hostedss - ef/WebApplication1/Migrations/20250309201823_InitialCreate.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using Microsoft.EntityFrameworkCore; 4 | using Microsoft.EntityFrameworkCore.Infrastructure; 5 | using Microsoft.EntityFrameworkCore.Metadata; 6 | using Microsoft.EntityFrameworkCore.Migrations; 7 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 8 | 9 | #nullable disable 10 | 11 | namespace WebApplication1.Migrations 12 | { 13 | [DbContext(typeof(WeatherForecastContext))] 14 | [Migration("20250309201823_InitialCreate")] 15 | partial class InitialCreate 16 | { 17 | /// 18 | protected override void BuildTargetModel(ModelBuilder modelBuilder) 19 | { 20 | #pragma warning disable 612, 618 21 | modelBuilder 22 | .HasAnnotation("ProductVersion", "9.0.2") 23 | .HasAnnotation("Relational:MaxIdentifierLength", 128); 24 | 25 | SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); 26 | 27 | modelBuilder.Entity("WeatherForecastData", b => 28 | { 29 | b.Property("Id") 30 | .ValueGeneratedOnAdd() 31 | .HasColumnType("int"); 32 | 33 | SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); 34 | 35 | b.Property("Date") 36 | .HasColumnType("date"); 37 | 38 | b.Property("TemperatureC") 39 | .HasColumnType("int"); 40 | 41 | b.HasKey("Id"); 42 | 43 | b.ToTable("WeatherForecasts"); 44 | }); 45 | #pragma warning restore 612, 618 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /todo_app/TodoApp.AppHost/TodoApp.AppHost.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Exe 7 | net9.0 8 | enable 9 | enable 10 | true 11 | 0af6455f-0a23-40c7-a24c-d161622ce326 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | PreserveNewest 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /base/Base.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.13.35825.156 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.AppHost", "AspireApp1.AppHost\AspireApp1.AppHost.csproj", "{46218DAD-4111-4C8C-B9B8-5210B4DD2A35}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.ServiceDefaults", "AspireApp1.ServiceDefaults\AspireApp1.ServiceDefaults.csproj", "{53D24348-B1DC-95A1-1953-B48BBD597BDB}" 8 | EndProject 9 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{03468DD3-2908-4884-BB51-4B29B27F8D99}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Any CPU = Debug|Any CPU 14 | Release|Any CPU = Release|Any CPU 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {46218DAD-4111-4C8C-B9B8-5210B4DD2A35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 18 | {46218DAD-4111-4C8C-B9B8-5210B4DD2A35}.Debug|Any CPU.Build.0 = Debug|Any CPU 19 | {46218DAD-4111-4C8C-B9B8-5210B4DD2A35}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 | {46218DAD-4111-4C8C-B9B8-5210B4DD2A35}.Release|Any CPU.Build.0 = Release|Any CPU 21 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.Build.0 = Release|Any CPU 25 | {03468DD3-2908-4884-BB51-4B29B27F8D99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {03468DD3-2908-4884-BB51-4B29B27F8D99}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {03468DD3-2908-4884-BB51-4B29B27F8D99}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {03468DD3-2908-4884-BB51-4B29B27F8D99}.Release|Any CPU.Build.0 = Release|Any CPU 29 | EndGlobalSection 30 | GlobalSection(SolutionProperties) = preSolution 31 | HideSolutionNode = FALSE 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {B0793839-6408-432D-AACE-28751CB062C5} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /byoss/BYOSS.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.13.35825.156 d17.13 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.AppHost", "AspireApp1.AppHost\AspireApp1.AppHost.csproj", "{9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.ServiceDefaults", "AspireApp1.ServiceDefaults\AspireApp1.ServiceDefaults.csproj", "{53D24348-B1DC-95A1-1953-B48BBD597BDB}" 8 | EndProject 9 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{A036D4D3-AA67-443A-A40C-820616585A4C}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Any CPU = Debug|Any CPU 14 | Release|Any CPU = Release|Any CPU 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 18 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.Build.0 = Debug|Any CPU 19 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.Build.0 = Release|Any CPU 21 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.Build.0 = Release|Any CPU 25 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Release|Any CPU.Build.0 = Release|Any CPU 29 | EndGlobalSection 30 | GlobalSection(SolutionProperties) = preSolution 31 | HideSolutionNode = FALSE 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {B1A25C6B-1481-4285-A5FC-0AA1CC1C05BE} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /hostedss/HostedSqlServer.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.13.35825.156 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.AppHost", "AspireApp1.AppHost\AspireApp1.AppHost.csproj", "{9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.ServiceDefaults", "AspireApp1.ServiceDefaults\AspireApp1.ServiceDefaults.csproj", "{53D24348-B1DC-95A1-1953-B48BBD597BDB}" 8 | EndProject 9 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{A036D4D3-AA67-443A-A40C-820616585A4C}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Any CPU = Debug|Any CPU 14 | Release|Any CPU = Release|Any CPU 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 18 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.Build.0 = Debug|Any CPU 19 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.Build.0 = Release|Any CPU 21 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.Build.0 = Release|Any CPU 25 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Release|Any CPU.Build.0 = Release|Any CPU 29 | EndGlobalSection 30 | GlobalSection(SolutionProperties) = preSolution 31 | HideSolutionNode = FALSE 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {B1A25C6B-1481-4285-A5FC-0AA1CC1C05BE} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/HostedSqlServer + DbUp + DAB.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.13.35825.156 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.AppHost", "AspireApp1.AppHost\AspireApp1.AppHost.csproj", "{9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.ServiceDefaults", "AspireApp1.ServiceDefaults\AspireApp1.ServiceDefaults.csproj", "{53D24348-B1DC-95A1-1953-B48BBD597BDB}" 8 | EndProject 9 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DatabaseDeploy", "DatabaseDeploy\DatabaseDeploy.csproj", "{D4142434-C001-2D94-A497-A438DB4E4A3E}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Any CPU = Debug|Any CPU 14 | Release|Any CPU = Release|Any CPU 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 18 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.Build.0 = Debug|Any CPU 19 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.Build.0 = Release|Any CPU 21 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.Build.0 = Release|Any CPU 25 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Release|Any CPU.Build.0 = Release|Any CPU 29 | EndGlobalSection 30 | GlobalSection(SolutionProperties) = preSolution 31 | HideSolutionNode = FALSE 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {B1A25C6B-1481-4285-A5FC-0AA1CC1C05BE} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /hostedss - dbup/HostedSqlServer + DbUp.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.13.35825.156 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.AppHost", "AspireApp1.AppHost\AspireApp1.AppHost.csproj", "{9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.ServiceDefaults", "AspireApp1.ServiceDefaults\AspireApp1.ServiceDefaults.csproj", "{53D24348-B1DC-95A1-1953-B48BBD597BDB}" 8 | EndProject 9 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{A036D4D3-AA67-443A-A40C-820616585A4C}" 10 | EndProject 11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DatabaseDeploy", "DatabaseDeploy\DatabaseDeploy.csproj", "{D4142434-C001-2D94-A497-A438DB4E4A3E}" 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Any CPU = Debug|Any CPU 16 | Release|Any CPU = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.Build.0 = Release|Any CPU 23 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 24 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.Build.0 = Debug|Any CPU 25 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.Build.0 = Release|Any CPU 27 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 28 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU 29 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU 30 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Release|Any CPU.Build.0 = Release|Any CPU 31 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 32 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Debug|Any CPU.Build.0 = Debug|Any CPU 33 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Release|Any CPU.ActiveCfg = Release|Any CPU 34 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Release|Any CPU.Build.0 = Release|Any CPU 35 | EndGlobalSection 36 | GlobalSection(SolutionProperties) = preSolution 37 | HideSolutionNode = FALSE 38 | EndGlobalSection 39 | GlobalSection(ExtensibilityGlobals) = postSolution 40 | SolutionGuid = {B1A25C6B-1481-4285-A5FC-0AA1CC1C05BE} 41 | EndGlobalSection 42 | EndGlobal 43 | -------------------------------------------------------------------------------- /hostedss - dbprj/HostedSqlServer + DBPrj.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.13.35825.156 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.AppHost", "AspireApp1.AppHost\AspireApp1.AppHost.csproj", "{9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.ServiceDefaults", "AspireApp1.ServiceDefaults\AspireApp1.ServiceDefaults.csproj", "{53D24348-B1DC-95A1-1953-B48BBD597BDB}" 8 | EndProject 9 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{A036D4D3-AA67-443A-A40C-820616585A4C}" 10 | EndProject 11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeatherDatabase", "WeatherDatabase\WeatherDatabase.sqlproj", "{D4142434-C001-2D94-A497-A438DB4E4A3E}" 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Any CPU = Debug|Any CPU 16 | Release|Any CPU = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.Build.0 = Release|Any CPU 23 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 24 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.Build.0 = Debug|Any CPU 25 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.Build.0 = Release|Any CPU 27 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 28 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU 29 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU 30 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Release|Any CPU.Build.0 = Release|Any CPU 31 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 32 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Debug|Any CPU.Build.0 = Debug|Any CPU 33 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Release|Any CPU.ActiveCfg = Release|Any CPU 34 | {D4142434-C001-2D94-A497-A438DB4E4A3E}.Release|Any CPU.Build.0 = Release|Any CPU 35 | EndGlobalSection 36 | GlobalSection(SolutionProperties) = preSolution 37 | HideSolutionNode = FALSE 38 | EndGlobalSection 39 | GlobalSection(ExtensibilityGlobals) = postSolution 40 | SolutionGuid = {B1A25C6B-1481-4285-A5FC-0AA1CC1C05BE} 41 | EndGlobalSection 42 | EndGlobal 43 | -------------------------------------------------------------------------------- /hostedss - ef/HostedSqlServer + EF.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.13.35825.156 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.AppHost", "AspireApp1.AppHost\AspireApp1.AppHost.csproj", "{9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.ServiceDefaults", "AspireApp1.ServiceDefaults\AspireApp1.ServiceDefaults.csproj", "{53D24348-B1DC-95A1-1953-B48BBD597BDB}" 8 | EndProject 9 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{A036D4D3-AA67-443A-A40C-820616585A4C}" 10 | EndProject 11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspireApp1.DatabaseMigrations", "AspireApp1.DatabaseMigrations\AspireApp1.DatabaseMigrations.csproj", "{81C236AA-70CB-4301-B07A-707061E7EF60}" 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Any CPU = Debug|Any CPU 16 | Release|Any CPU = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {9C047718-F4A9-4497-A7BA-6D7FCA4F04CE}.Release|Any CPU.Build.0 = Release|Any CPU 23 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 24 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Debug|Any CPU.Build.0 = Debug|Any CPU 25 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {53D24348-B1DC-95A1-1953-B48BBD597BDB}.Release|Any CPU.Build.0 = Release|Any CPU 27 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 28 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU 29 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU 30 | {A036D4D3-AA67-443A-A40C-820616585A4C}.Release|Any CPU.Build.0 = Release|Any CPU 31 | {81C236AA-70CB-4301-B07A-707061E7EF60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 32 | {81C236AA-70CB-4301-B07A-707061E7EF60}.Debug|Any CPU.Build.0 = Debug|Any CPU 33 | {81C236AA-70CB-4301-B07A-707061E7EF60}.Release|Any CPU.ActiveCfg = Release|Any CPU 34 | {81C236AA-70CB-4301-B07A-707061E7EF60}.Release|Any CPU.Build.0 = Release|Any CPU 35 | EndGlobalSection 36 | GlobalSection(SolutionProperties) = preSolution 37 | HideSolutionNode = FALSE 38 | EndGlobalSection 39 | GlobalSection(ExtensibilityGlobals) = postSolution 40 | SolutionGuid = {B1A25C6B-1481-4285-A5FC-0AA1CC1C05BE} 41 | EndGlobalSection 42 | EndGlobal 43 | -------------------------------------------------------------------------------- /todo_app/TodoApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.31903.59 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TodoApp.AppHost", "TodoApp.AppHost\TodoApp.AppHost.csproj", "{7FDD95F2-7D46-41E8-B900-B66CFA5332E0}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TodoApp.ServiceDefaults", "TodoApp.ServiceDefaults\TodoApp.ServiceDefaults.csproj", "{BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|x64 = Debug|x64 14 | Debug|x86 = Debug|x86 15 | Release|Any CPU = Release|Any CPU 16 | Release|x64 = Release|x64 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Debug|x64.ActiveCfg = Debug|Any CPU 23 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Debug|x64.Build.0 = Debug|Any CPU 24 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Debug|x86.ActiveCfg = Debug|Any CPU 25 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Debug|x86.Build.0 = Debug|Any CPU 26 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Release|x64.ActiveCfg = Release|Any CPU 29 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Release|x64.Build.0 = Release|Any CPU 30 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Release|x86.ActiveCfg = Release|Any CPU 31 | {7FDD95F2-7D46-41E8-B900-B66CFA5332E0}.Release|x86.Build.0 = Release|Any CPU 32 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Debug|x64.ActiveCfg = Debug|Any CPU 35 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Debug|x64.Build.0 = Debug|Any CPU 36 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Debug|x86.ActiveCfg = Debug|Any CPU 37 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Debug|x86.Build.0 = Debug|Any CPU 38 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Release|Any CPU.ActiveCfg = Release|Any CPU 39 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Release|Any CPU.Build.0 = Release|Any CPU 40 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Release|x64.ActiveCfg = Release|Any CPU 41 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Release|x64.Build.0 = Release|Any CPU 42 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Release|x86.ActiveCfg = Release|Any CPU 43 | {BD0847DF-1C3D-4ECE-AF10-4DB5F68A440E}.Release|x86.Build.0 = Release|Any CPU 44 | EndGlobalSection 45 | GlobalSection(SolutionProperties) = preSolution 46 | HideSolutionNode = FALSE 47 | EndGlobalSection 48 | EndGlobal 49 | -------------------------------------------------------------------------------- /hostedss - ef/AspireApp1.DatabaseMigrations/Worker.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore.Infrastructure; 3 | using Microsoft.EntityFrameworkCore.Storage; 4 | using OpenTelemetry.Trace; 5 | using System.Diagnostics; 6 | using static System.Runtime.InteropServices.JavaScript.JSType; 7 | 8 | namespace AspireApp1.DatabaseMigrations; 9 | 10 | public class Worker(IServiceProvider serviceProvider, IHostApplicationLifetime hostApplicationLifetime) : BackgroundService 11 | { 12 | private static readonly ActivitySource ActivitySource = new("DatabaseMigrations"); 13 | 14 | protected override async Task ExecuteAsync(CancellationToken cancellationToken) 15 | { 16 | using var activity = ActivitySource.StartActivity("Migrating database", ActivityKind.Client); 17 | 18 | try 19 | { 20 | using var scope = serviceProvider.CreateScope(); 21 | var dbContext = scope.ServiceProvider.GetRequiredService(); 22 | 23 | await EnsureDatabaseAsync(dbContext, cancellationToken); 24 | await RunMigrationAsync(dbContext, cancellationToken); 25 | await SeedDataAsync(dbContext, cancellationToken); 26 | } 27 | catch (Exception ex) 28 | { 29 | activity?.AddException(ex); 30 | throw; 31 | } 32 | 33 | hostApplicationLifetime.StopApplication(); 34 | } 35 | 36 | private static async Task EnsureDatabaseAsync(WeatherForecastContext dbContext, CancellationToken cancellationToken) 37 | { 38 | var dbCreator = dbContext.GetService(); 39 | 40 | var strategy = dbContext.Database.CreateExecutionStrategy(); 41 | await strategy.ExecuteAsync(async () => 42 | { 43 | // Create the database if it does not exist. 44 | // Do this first so there is then a database to start a transaction against. 45 | if (!await dbCreator.ExistsAsync(cancellationToken)) 46 | { 47 | await dbCreator.CreateAsync(cancellationToken); 48 | } 49 | }); 50 | } 51 | 52 | private static async Task RunMigrationAsync(WeatherForecastContext dbContext, CancellationToken cancellationToken) 53 | { 54 | var strategy = dbContext.Database.CreateExecutionStrategy(); 55 | await strategy.ExecuteAsync(async () => 56 | { 57 | // Run migration in a transaction to avoid partial migration if it fails. 58 | await using var transaction = await dbContext.Database.BeginTransactionAsync(cancellationToken); 59 | await dbContext.Database.MigrateAsync(cancellationToken); 60 | await transaction.CommitAsync(cancellationToken); 61 | }); 62 | } 63 | 64 | private static async Task SeedDataAsync(WeatherForecastContext dbContext, CancellationToken cancellationToken) 65 | { 66 | List wfdList = [ 67 | new () { 68 | Date = DateOnly.FromDateTime(DateTime.Today), 69 | TemperatureC = 20 70 | }, 71 | new () { 72 | Date = DateOnly.FromDateTime(DateTime.Today.AddDays(1)), 73 | TemperatureC = 22 74 | }, 75 | ]; 76 | 77 | var strategy = dbContext.Database.CreateExecutionStrategy(); 78 | await strategy.ExecuteAsync(async () => 79 | { 80 | // Seed the database 81 | await using var transaction = await dbContext.Database.BeginTransactionAsync(cancellationToken); 82 | 83 | foreach (var wfd in wfdList) 84 | { 85 | if (dbContext.WeatherForecasts.Where(d => d.Date == wfd.Date).SingleOrDefault() == null) 86 | await dbContext.WeatherForecasts.AddAsync(wfd, cancellationToken); 87 | } 88 | 89 | await dbContext.SaveChangesAsync(cancellationToken); 90 | await transaction.CommitAsync(cancellationToken); 91 | }); 92 | } 93 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to [project-title] 2 | 3 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 4 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 5 | the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. 6 | 7 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide 8 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions 9 | provided by the bot. You will only need to do this once across all repos using our CLA. 10 | 11 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 12 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 13 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 14 | 15 | - [Code of Conduct](#coc) 16 | - [Issues and Bugs](#issue) 17 | - [Feature Requests](#feature) 18 | - [Submission Guidelines](#submit) 19 | 20 | ## Code of Conduct 21 | Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 22 | 23 | ## Found an Issue? 24 | If you find a bug in the source code or a mistake in the documentation, you can help us by 25 | [submitting an issue](#submit-issue) to the GitHub Repository. Even better, you can 26 | [submit a Pull Request](#submit-pr) with a fix. 27 | 28 | ## Want a Feature? 29 | You can *request* a new feature by [submitting an issue](#submit-issue) to the GitHub 30 | Repository. If you would like to *implement* a new feature, please submit an issue with 31 | a proposal for your work first, to be sure that we can use it. 32 | 33 | * **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). 34 | 35 | ## Submission Guidelines 36 | 37 | ### Submitting an Issue 38 | Before you submit an issue, search the archive, maybe your question was already answered. 39 | 40 | If your issue appears to be a bug, and hasn't been reported, open a new issue. 41 | Help us to maximize the effort we can spend fixing issues and adding new 42 | features, by not reporting duplicate issues. Providing the following information will increase the 43 | chances of your issue being dealt with quickly: 44 | 45 | * **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps 46 | * **Version** - what version is affected (e.g. 0.1.2) 47 | * **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you 48 | * **Browsers and Operating System** - is this a problem with all browsers? 49 | * **Reproduce the Error** - provide a live example or a unambiguous set of steps 50 | * **Related Issues** - has a similar issue been reported before? 51 | * **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be 52 | causing the problem (line of code or commit) 53 | 54 | You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/[organization-name]/[repository-name]/issues/new]. 55 | 56 | ### Submitting a Pull Request (PR) 57 | Before you submit your Pull Request (PR) consider the following guidelines: 58 | 59 | * Search the repository (https://github.com/[organization-name]/[repository-name]/pulls) for an open or closed PR 60 | that relates to your submission. You don't want to duplicate effort. 61 | 62 | * Make your changes in a new git fork: 63 | 64 | * Commit your changes using a descriptive commit message 65 | * Push your fork to GitHub: 66 | * In GitHub, create a pull request 67 | * If we suggest changes then: 68 | * Make the required updates. 69 | * Rebase your fork and force push to your GitHub repository (this will update your Pull Request): 70 | 71 | ```shell 72 | git rebase master -i 73 | git push -f 74 | ``` 75 | 76 | That's it! Thank you for your contribution! 77 | -------------------------------------------------------------------------------- /todo_app/next-steps.md: -------------------------------------------------------------------------------- 1 | # Next Steps after `azd init` 2 | 3 | ## Table of Contents 4 | 5 | 1. [Next Steps](#next-steps) 6 | 2. [What was added](#what-was-added) 7 | 3. [Billing](#billing) 8 | 4. [Troubleshooting](#troubleshooting) 9 | 10 | ## Next Steps 11 | 12 | ### Provision infrastructure and deploy application code 13 | 14 | Run `azd up` to provision your infrastructure and deploy to Azure in one step (or run `azd provision` then `azd deploy` to accomplish the tasks separately). Visit the service endpoints listed to see your application up-and-running! 15 | 16 | To troubleshoot any issues, see [troubleshooting](#troubleshooting). 17 | 18 | ### Configure CI/CD pipeline 19 | 20 | 1. Create a workflow pipeline file locally. The following starters are available: 21 | - [Deploy with GitHub Actions](https://github.com/Azure-Samples/azd-starter-bicep/blob/main/.github/workflows/azure-dev.yml) 22 | - [Deploy with Azure Pipelines](https://github.com/Azure-Samples/azd-starter-bicep/blob/main/.azdo/pipelines/azure-dev.yml) 23 | 2. Run `azd pipeline config -e ` to configure the deployment pipeline to connect securely to Azure. An environment name is specified here to configure the pipeline with a different environment for isolation purposes. Run `azd env list` and `azd env set` to reselect the default environment after this step. 24 | 25 | ## What was added 26 | 27 | ### Infrastructure configuration 28 | 29 | To describe the infrastructure and application, an `azure.yaml` was added with the following directory structure: 30 | 31 | ```yaml 32 | - azure.yaml # azd project configuration 33 | ``` 34 | 35 | This file contains a single service, which references your project's App Host. When needed, `azd` generates the required infrastructure as code in memory and uses it. 36 | 37 | If you would like to see or modify the infrastructure that `azd` uses, run `azd infra synth` to persist it to disk. 38 | 39 | If you do this, some additional directories will be created: 40 | 41 | ```yaml 42 | - infra/ # Infrastructure as Code (bicep) files 43 | - main.bicep # main deployment module 44 | - resources.bicep # resources shared across your application's services 45 | ``` 46 | 47 | In addition, for each project resource referenced by your app host, a `containerApp.tmpl.yaml` file will be created in a directory named `manifests` next the project file. This file contains the infrastructure as code for running the project on Azure Container Apps. 48 | 49 | *Note*: Once you have synthesized your infrastructure to disk, changes made to your App Host will not be reflected in the infrastructure. You can re-generate the infrastructure by running `azd infra synth` again. It will prompt you before overwriting files. You can pass `--force` to force `azd infra synth` to overwrite the files without prompting. 50 | 51 | *Note*: `azd infra synth` is currently an alpha feature and must be explicitly enabled by running `azd config set alpha.infraSynth on`. You only need to do this once. 52 | 53 | ## Billing 54 | 55 | Visit the *Cost Management + Billing* page in Azure Portal to track current spend. For more information about how you're billed, and how you can monitor the costs incurred in your Azure subscriptions, visit [billing overview](https://learn.microsoft.com/azure/developer/intro/azure-developer-billing). 56 | 57 | ## Troubleshooting 58 | 59 | Q: I visited the service endpoint listed, and I'm seeing a blank page, a generic welcome page, or an error page. 60 | 61 | A: Your service may have failed to start, or it may be missing some configuration settings. To investigate further: 62 | 63 | 1. Run `azd show`. Click on the link under "View in Azure Portal" to open the resource group in Azure Portal. 64 | 2. Navigate to the specific Container App service that is failing to deploy. 65 | 3. Click on the failing revision under "Revisions with Issues". 66 | 4. Review "Status details" for more information about the type of failure. 67 | 5. Observe the log outputs from Console log stream and System log stream to identify any errors. 68 | 6. If logs are written to disk, use *Console* in the navigation to connect to a shell within the running container. 69 | 70 | For more troubleshooting information, visit [Container Apps troubleshooting](https://learn.microsoft.com/azure/container-apps/troubleshooting). 71 | 72 | ### Additional information 73 | 74 | For additional information about setting up your `azd` project, visit our official [docs](https://learn.microsoft.com/azure/developer/azure-developer-cli/make-azd-compatible?pivots=azd-convert). 75 | -------------------------------------------------------------------------------- /base/AspireApp1.ServiceDefaults/Extensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Diagnostics.HealthChecks; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Diagnostics.HealthChecks; 5 | using Microsoft.Extensions.Logging; 6 | using Microsoft.Extensions.ServiceDiscovery; 7 | using OpenTelemetry; 8 | using OpenTelemetry.Metrics; 9 | using OpenTelemetry.Trace; 10 | 11 | namespace Microsoft.Extensions.Hosting; 12 | 13 | // Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry. 14 | // This project should be referenced by each service project in your solution. 15 | // To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults 16 | public static class Extensions 17 | { 18 | public static TBuilder AddServiceDefaults(this TBuilder builder) where TBuilder : IHostApplicationBuilder 19 | { 20 | builder.ConfigureOpenTelemetry(); 21 | 22 | builder.AddDefaultHealthChecks(); 23 | 24 | builder.Services.AddServiceDiscovery(); 25 | 26 | builder.Services.ConfigureHttpClientDefaults(http => 27 | { 28 | // Turn on resilience by default 29 | http.AddStandardResilienceHandler(); 30 | 31 | // Turn on service discovery by default 32 | http.AddServiceDiscovery(); 33 | }); 34 | 35 | // Uncomment the following to restrict the allowed schemes for service discovery. 36 | // builder.Services.Configure(options => 37 | // { 38 | // options.AllowedSchemes = ["https"]; 39 | // }); 40 | 41 | return builder; 42 | } 43 | 44 | public static TBuilder ConfigureOpenTelemetry(this TBuilder builder) where TBuilder : IHostApplicationBuilder 45 | { 46 | builder.Logging.AddOpenTelemetry(logging => 47 | { 48 | logging.IncludeFormattedMessage = true; 49 | logging.IncludeScopes = true; 50 | }); 51 | 52 | builder.Services.AddOpenTelemetry() 53 | .WithMetrics(metrics => 54 | { 55 | metrics.AddAspNetCoreInstrumentation() 56 | .AddHttpClientInstrumentation() 57 | .AddRuntimeInstrumentation(); 58 | }) 59 | .WithTracing(tracing => 60 | { 61 | tracing.AddSource(builder.Environment.ApplicationName) 62 | .AddAspNetCoreInstrumentation() 63 | // Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package) 64 | //.AddGrpcClientInstrumentation() 65 | .AddHttpClientInstrumentation(); 66 | }); 67 | 68 | builder.AddOpenTelemetryExporters(); 69 | 70 | return builder; 71 | } 72 | 73 | private static TBuilder AddOpenTelemetryExporters(this TBuilder builder) where TBuilder : IHostApplicationBuilder 74 | { 75 | var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]); 76 | 77 | if (useOtlpExporter) 78 | { 79 | builder.Services.AddOpenTelemetry().UseOtlpExporter(); 80 | } 81 | 82 | // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) 83 | //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) 84 | //{ 85 | // builder.Services.AddOpenTelemetry() 86 | // .UseAzureMonitor(); 87 | //} 88 | 89 | return builder; 90 | } 91 | 92 | public static TBuilder AddDefaultHealthChecks(this TBuilder builder) where TBuilder : IHostApplicationBuilder 93 | { 94 | builder.Services.AddHealthChecks() 95 | // Add a default liveness check to ensure app is responsive 96 | .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); 97 | 98 | return builder; 99 | } 100 | 101 | public static WebApplication MapDefaultEndpoints(this WebApplication app) 102 | { 103 | // Adding health checks endpoints to applications in non-development environments has security implications. 104 | // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. 105 | if (app.Environment.IsDevelopment()) 106 | { 107 | // All health checks must pass for app to be considered ready to accept traffic after starting 108 | app.MapHealthChecks("/health"); 109 | 110 | // Only health checks tagged with the "live" tag must pass for app to be considered alive 111 | app.MapHealthChecks("/alive", new HealthCheckOptions 112 | { 113 | Predicate = r => r.Tags.Contains("live") 114 | }); 115 | } 116 | 117 | return app; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /byoss/AspireApp1.ServiceDefaults/Extensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Diagnostics.HealthChecks; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Diagnostics.HealthChecks; 5 | using Microsoft.Extensions.Logging; 6 | using Microsoft.Extensions.ServiceDiscovery; 7 | using OpenTelemetry; 8 | using OpenTelemetry.Metrics; 9 | using OpenTelemetry.Trace; 10 | 11 | namespace Microsoft.Extensions.Hosting; 12 | 13 | // Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry. 14 | // This project should be referenced by each service project in your solution. 15 | // To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults 16 | public static class Extensions 17 | { 18 | public static TBuilder AddServiceDefaults(this TBuilder builder) where TBuilder : IHostApplicationBuilder 19 | { 20 | builder.ConfigureOpenTelemetry(); 21 | 22 | builder.AddDefaultHealthChecks(); 23 | 24 | builder.Services.AddServiceDiscovery(); 25 | 26 | builder.Services.ConfigureHttpClientDefaults(http => 27 | { 28 | // Turn on resilience by default 29 | http.AddStandardResilienceHandler(); 30 | 31 | // Turn on service discovery by default 32 | http.AddServiceDiscovery(); 33 | }); 34 | 35 | // Uncomment the following to restrict the allowed schemes for service discovery. 36 | // builder.Services.Configure(options => 37 | // { 38 | // options.AllowedSchemes = ["https"]; 39 | // }); 40 | 41 | return builder; 42 | } 43 | 44 | public static TBuilder ConfigureOpenTelemetry(this TBuilder builder) where TBuilder : IHostApplicationBuilder 45 | { 46 | builder.Logging.AddOpenTelemetry(logging => 47 | { 48 | logging.IncludeFormattedMessage = true; 49 | logging.IncludeScopes = true; 50 | }); 51 | 52 | builder.Services.AddOpenTelemetry() 53 | .WithMetrics(metrics => 54 | { 55 | metrics.AddAspNetCoreInstrumentation() 56 | .AddHttpClientInstrumentation() 57 | .AddRuntimeInstrumentation(); 58 | }) 59 | .WithTracing(tracing => 60 | { 61 | tracing.AddSource(builder.Environment.ApplicationName) 62 | .AddAspNetCoreInstrumentation() 63 | // Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package) 64 | //.AddGrpcClientInstrumentation() 65 | .AddHttpClientInstrumentation(); 66 | }); 67 | 68 | builder.AddOpenTelemetryExporters(); 69 | 70 | return builder; 71 | } 72 | 73 | private static TBuilder AddOpenTelemetryExporters(this TBuilder builder) where TBuilder : IHostApplicationBuilder 74 | { 75 | var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]); 76 | 77 | if (useOtlpExporter) 78 | { 79 | builder.Services.AddOpenTelemetry().UseOtlpExporter(); 80 | } 81 | 82 | // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) 83 | //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) 84 | //{ 85 | // builder.Services.AddOpenTelemetry() 86 | // .UseAzureMonitor(); 87 | //} 88 | 89 | return builder; 90 | } 91 | 92 | public static TBuilder AddDefaultHealthChecks(this TBuilder builder) where TBuilder : IHostApplicationBuilder 93 | { 94 | builder.Services.AddHealthChecks() 95 | // Add a default liveness check to ensure app is responsive 96 | .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); 97 | 98 | return builder; 99 | } 100 | 101 | public static WebApplication MapDefaultEndpoints(this WebApplication app) 102 | { 103 | // Adding health checks endpoints to applications in non-development environments has security implications. 104 | // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. 105 | if (app.Environment.IsDevelopment()) 106 | { 107 | // All health checks must pass for app to be considered ready to accept traffic after starting 108 | app.MapHealthChecks("/health"); 109 | 110 | // Only health checks tagged with the "live" tag must pass for app to be considered alive 111 | app.MapHealthChecks("/alive", new HealthCheckOptions 112 | { 113 | Predicate = r => r.Tags.Contains("live") 114 | }); 115 | } 116 | 117 | return app; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /todo_app/TodoApp.ServiceDefaults/Extensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Diagnostics.HealthChecks; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Diagnostics.HealthChecks; 5 | using Microsoft.Extensions.Logging; 6 | using Microsoft.Extensions.ServiceDiscovery; 7 | using OpenTelemetry; 8 | using OpenTelemetry.Metrics; 9 | using OpenTelemetry.Trace; 10 | 11 | namespace Microsoft.Extensions.Hosting; 12 | 13 | // Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry. 14 | // This project should be referenced by each service project in your solution. 15 | // To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults 16 | public static class Extensions 17 | { 18 | public static TBuilder AddServiceDefaults(this TBuilder builder) where TBuilder : IHostApplicationBuilder 19 | { 20 | builder.ConfigureOpenTelemetry(); 21 | 22 | builder.AddDefaultHealthChecks(); 23 | 24 | builder.Services.AddServiceDiscovery(); 25 | 26 | builder.Services.ConfigureHttpClientDefaults(http => 27 | { 28 | // Turn on resilience by default 29 | http.AddStandardResilienceHandler(); 30 | 31 | // Turn on service discovery by default 32 | http.AddServiceDiscovery(); 33 | }); 34 | 35 | // Uncomment the following to restrict the allowed schemes for service discovery. 36 | // builder.Services.Configure(options => 37 | // { 38 | // options.AllowedSchemes = ["https"]; 39 | // }); 40 | 41 | return builder; 42 | } 43 | 44 | public static TBuilder ConfigureOpenTelemetry(this TBuilder builder) where TBuilder : IHostApplicationBuilder 45 | { 46 | builder.Logging.AddOpenTelemetry(logging => 47 | { 48 | logging.IncludeFormattedMessage = true; 49 | logging.IncludeScopes = true; 50 | }); 51 | 52 | builder.Services.AddOpenTelemetry() 53 | .WithMetrics(metrics => 54 | { 55 | metrics.AddAspNetCoreInstrumentation() 56 | .AddHttpClientInstrumentation() 57 | .AddRuntimeInstrumentation(); 58 | }) 59 | .WithTracing(tracing => 60 | { 61 | tracing.AddSource(builder.Environment.ApplicationName) 62 | .AddAspNetCoreInstrumentation() 63 | // Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package) 64 | //.AddGrpcClientInstrumentation() 65 | .AddHttpClientInstrumentation(); 66 | }); 67 | 68 | builder.AddOpenTelemetryExporters(); 69 | 70 | return builder; 71 | } 72 | 73 | private static TBuilder AddOpenTelemetryExporters(this TBuilder builder) where TBuilder : IHostApplicationBuilder 74 | { 75 | var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]); 76 | 77 | if (useOtlpExporter) 78 | { 79 | builder.Services.AddOpenTelemetry().UseOtlpExporter(); 80 | } 81 | 82 | // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) 83 | //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) 84 | //{ 85 | // builder.Services.AddOpenTelemetry() 86 | // .UseAzureMonitor(); 87 | //} 88 | 89 | return builder; 90 | } 91 | 92 | public static TBuilder AddDefaultHealthChecks(this TBuilder builder) where TBuilder : IHostApplicationBuilder 93 | { 94 | builder.Services.AddHealthChecks() 95 | // Add a default liveness check to ensure app is responsive 96 | .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); 97 | 98 | return builder; 99 | } 100 | 101 | public static WebApplication MapDefaultEndpoints(this WebApplication app) 102 | { 103 | // Adding health checks endpoints to applications in non-development environments has security implications. 104 | // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. 105 | if (app.Environment.IsDevelopment()) 106 | { 107 | // All health checks must pass for app to be considered ready to accept traffic after starting 108 | app.MapHealthChecks("/health"); 109 | 110 | // Only health checks tagged with the "live" tag must pass for app to be considered alive 111 | app.MapHealthChecks("/alive", new HealthCheckOptions 112 | { 113 | Predicate = r => r.Tags.Contains("live") 114 | }); 115 | } 116 | 117 | return app; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /hostedss/AspireApp1.ServiceDefaults/Extensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Diagnostics.HealthChecks; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Diagnostics.HealthChecks; 5 | using Microsoft.Extensions.Logging; 6 | using Microsoft.Extensions.ServiceDiscovery; 7 | using OpenTelemetry; 8 | using OpenTelemetry.Metrics; 9 | using OpenTelemetry.Trace; 10 | 11 | namespace Microsoft.Extensions.Hosting; 12 | 13 | // Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry. 14 | // This project should be referenced by each service project in your solution. 15 | // To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults 16 | public static class Extensions 17 | { 18 | public static TBuilder AddServiceDefaults(this TBuilder builder) where TBuilder : IHostApplicationBuilder 19 | { 20 | builder.ConfigureOpenTelemetry(); 21 | 22 | builder.AddDefaultHealthChecks(); 23 | 24 | builder.Services.AddServiceDiscovery(); 25 | 26 | builder.Services.ConfigureHttpClientDefaults(http => 27 | { 28 | // Turn on resilience by default 29 | http.AddStandardResilienceHandler(); 30 | 31 | // Turn on service discovery by default 32 | http.AddServiceDiscovery(); 33 | }); 34 | 35 | // Uncomment the following to restrict the allowed schemes for service discovery. 36 | // builder.Services.Configure(options => 37 | // { 38 | // options.AllowedSchemes = ["https"]; 39 | // }); 40 | 41 | return builder; 42 | } 43 | 44 | public static TBuilder ConfigureOpenTelemetry(this TBuilder builder) where TBuilder : IHostApplicationBuilder 45 | { 46 | builder.Logging.AddOpenTelemetry(logging => 47 | { 48 | logging.IncludeFormattedMessage = true; 49 | logging.IncludeScopes = true; 50 | }); 51 | 52 | builder.Services.AddOpenTelemetry() 53 | .WithMetrics(metrics => 54 | { 55 | metrics.AddAspNetCoreInstrumentation() 56 | .AddHttpClientInstrumentation() 57 | .AddRuntimeInstrumentation(); 58 | }) 59 | .WithTracing(tracing => 60 | { 61 | tracing.AddSource(builder.Environment.ApplicationName) 62 | .AddAspNetCoreInstrumentation() 63 | // Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package) 64 | //.AddGrpcClientInstrumentation() 65 | .AddHttpClientInstrumentation(); 66 | }); 67 | 68 | builder.AddOpenTelemetryExporters(); 69 | 70 | return builder; 71 | } 72 | 73 | private static TBuilder AddOpenTelemetryExporters(this TBuilder builder) where TBuilder : IHostApplicationBuilder 74 | { 75 | var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]); 76 | 77 | if (useOtlpExporter) 78 | { 79 | builder.Services.AddOpenTelemetry().UseOtlpExporter(); 80 | } 81 | 82 | // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) 83 | //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) 84 | //{ 85 | // builder.Services.AddOpenTelemetry() 86 | // .UseAzureMonitor(); 87 | //} 88 | 89 | return builder; 90 | } 91 | 92 | public static TBuilder AddDefaultHealthChecks(this TBuilder builder) where TBuilder : IHostApplicationBuilder 93 | { 94 | builder.Services.AddHealthChecks() 95 | // Add a default liveness check to ensure app is responsive 96 | .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); 97 | 98 | return builder; 99 | } 100 | 101 | public static WebApplication MapDefaultEndpoints(this WebApplication app) 102 | { 103 | // Adding health checks endpoints to applications in non-development environments has security implications. 104 | // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. 105 | if (app.Environment.IsDevelopment()) 106 | { 107 | // All health checks must pass for app to be considered ready to accept traffic after starting 108 | app.MapHealthChecks("/health"); 109 | 110 | // Only health checks tagged with the "live" tag must pass for app to be considered alive 111 | app.MapHealthChecks("/alive", new HealthCheckOptions 112 | { 113 | Predicate = r => r.Tags.Contains("live") 114 | }); 115 | } 116 | 117 | return app; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /hostedss - dbprj/AspireApp1.ServiceDefaults/Extensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Diagnostics.HealthChecks; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Diagnostics.HealthChecks; 5 | using Microsoft.Extensions.Logging; 6 | using Microsoft.Extensions.ServiceDiscovery; 7 | using OpenTelemetry; 8 | using OpenTelemetry.Metrics; 9 | using OpenTelemetry.Trace; 10 | 11 | namespace Microsoft.Extensions.Hosting; 12 | 13 | // Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry. 14 | // This project should be referenced by each service project in your solution. 15 | // To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults 16 | public static class Extensions 17 | { 18 | public static TBuilder AddServiceDefaults(this TBuilder builder) where TBuilder : IHostApplicationBuilder 19 | { 20 | builder.ConfigureOpenTelemetry(); 21 | 22 | builder.AddDefaultHealthChecks(); 23 | 24 | builder.Services.AddServiceDiscovery(); 25 | 26 | builder.Services.ConfigureHttpClientDefaults(http => 27 | { 28 | // Turn on resilience by default 29 | http.AddStandardResilienceHandler(); 30 | 31 | // Turn on service discovery by default 32 | http.AddServiceDiscovery(); 33 | }); 34 | 35 | // Uncomment the following to restrict the allowed schemes for service discovery. 36 | // builder.Services.Configure(options => 37 | // { 38 | // options.AllowedSchemes = ["https"]; 39 | // }); 40 | 41 | return builder; 42 | } 43 | 44 | public static TBuilder ConfigureOpenTelemetry(this TBuilder builder) where TBuilder : IHostApplicationBuilder 45 | { 46 | builder.Logging.AddOpenTelemetry(logging => 47 | { 48 | logging.IncludeFormattedMessage = true; 49 | logging.IncludeScopes = true; 50 | }); 51 | 52 | builder.Services.AddOpenTelemetry() 53 | .WithMetrics(metrics => 54 | { 55 | metrics.AddAspNetCoreInstrumentation() 56 | .AddHttpClientInstrumentation() 57 | .AddRuntimeInstrumentation(); 58 | }) 59 | .WithTracing(tracing => 60 | { 61 | tracing.AddSource(builder.Environment.ApplicationName) 62 | .AddAspNetCoreInstrumentation() 63 | // Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package) 64 | //.AddGrpcClientInstrumentation() 65 | .AddHttpClientInstrumentation(); 66 | }); 67 | 68 | builder.AddOpenTelemetryExporters(); 69 | 70 | return builder; 71 | } 72 | 73 | private static TBuilder AddOpenTelemetryExporters(this TBuilder builder) where TBuilder : IHostApplicationBuilder 74 | { 75 | var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]); 76 | 77 | if (useOtlpExporter) 78 | { 79 | builder.Services.AddOpenTelemetry().UseOtlpExporter(); 80 | } 81 | 82 | // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) 83 | //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) 84 | //{ 85 | // builder.Services.AddOpenTelemetry() 86 | // .UseAzureMonitor(); 87 | //} 88 | 89 | return builder; 90 | } 91 | 92 | public static TBuilder AddDefaultHealthChecks(this TBuilder builder) where TBuilder : IHostApplicationBuilder 93 | { 94 | builder.Services.AddHealthChecks() 95 | // Add a default liveness check to ensure app is responsive 96 | .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); 97 | 98 | return builder; 99 | } 100 | 101 | public static WebApplication MapDefaultEndpoints(this WebApplication app) 102 | { 103 | // Adding health checks endpoints to applications in non-development environments has security implications. 104 | // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. 105 | if (app.Environment.IsDevelopment()) 106 | { 107 | // All health checks must pass for app to be considered ready to accept traffic after starting 108 | app.MapHealthChecks("/health"); 109 | 110 | // Only health checks tagged with the "live" tag must pass for app to be considered alive 111 | app.MapHealthChecks("/alive", new HealthCheckOptions 112 | { 113 | Predicate = r => r.Tags.Contains("live") 114 | }); 115 | } 116 | 117 | return app; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /hostedss - dbup/AspireApp1.ServiceDefaults/Extensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Diagnostics.HealthChecks; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Diagnostics.HealthChecks; 5 | using Microsoft.Extensions.Logging; 6 | using Microsoft.Extensions.ServiceDiscovery; 7 | using OpenTelemetry; 8 | using OpenTelemetry.Metrics; 9 | using OpenTelemetry.Trace; 10 | 11 | namespace Microsoft.Extensions.Hosting; 12 | 13 | // Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry. 14 | // This project should be referenced by each service project in your solution. 15 | // To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults 16 | public static class Extensions 17 | { 18 | public static TBuilder AddServiceDefaults(this TBuilder builder) where TBuilder : IHostApplicationBuilder 19 | { 20 | builder.ConfigureOpenTelemetry(); 21 | 22 | builder.AddDefaultHealthChecks(); 23 | 24 | builder.Services.AddServiceDiscovery(); 25 | 26 | builder.Services.ConfigureHttpClientDefaults(http => 27 | { 28 | // Turn on resilience by default 29 | http.AddStandardResilienceHandler(); 30 | 31 | // Turn on service discovery by default 32 | http.AddServiceDiscovery(); 33 | }); 34 | 35 | // Uncomment the following to restrict the allowed schemes for service discovery. 36 | // builder.Services.Configure(options => 37 | // { 38 | // options.AllowedSchemes = ["https"]; 39 | // }); 40 | 41 | return builder; 42 | } 43 | 44 | public static TBuilder ConfigureOpenTelemetry(this TBuilder builder) where TBuilder : IHostApplicationBuilder 45 | { 46 | builder.Logging.AddOpenTelemetry(logging => 47 | { 48 | logging.IncludeFormattedMessage = true; 49 | logging.IncludeScopes = true; 50 | }); 51 | 52 | builder.Services.AddOpenTelemetry() 53 | .WithMetrics(metrics => 54 | { 55 | metrics.AddAspNetCoreInstrumentation() 56 | .AddHttpClientInstrumentation() 57 | .AddRuntimeInstrumentation(); 58 | }) 59 | .WithTracing(tracing => 60 | { 61 | tracing.AddSource(builder.Environment.ApplicationName) 62 | .AddAspNetCoreInstrumentation() 63 | // Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package) 64 | //.AddGrpcClientInstrumentation() 65 | .AddHttpClientInstrumentation(); 66 | }); 67 | 68 | builder.AddOpenTelemetryExporters(); 69 | 70 | return builder; 71 | } 72 | 73 | private static TBuilder AddOpenTelemetryExporters(this TBuilder builder) where TBuilder : IHostApplicationBuilder 74 | { 75 | var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]); 76 | 77 | if (useOtlpExporter) 78 | { 79 | builder.Services.AddOpenTelemetry().UseOtlpExporter(); 80 | } 81 | 82 | // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) 83 | //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) 84 | //{ 85 | // builder.Services.AddOpenTelemetry() 86 | // .UseAzureMonitor(); 87 | //} 88 | 89 | return builder; 90 | } 91 | 92 | public static TBuilder AddDefaultHealthChecks(this TBuilder builder) where TBuilder : IHostApplicationBuilder 93 | { 94 | builder.Services.AddHealthChecks() 95 | // Add a default liveness check to ensure app is responsive 96 | .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); 97 | 98 | return builder; 99 | } 100 | 101 | public static WebApplication MapDefaultEndpoints(this WebApplication app) 102 | { 103 | // Adding health checks endpoints to applications in non-development environments has security implications. 104 | // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. 105 | if (app.Environment.IsDevelopment()) 106 | { 107 | // All health checks must pass for app to be considered ready to accept traffic after starting 108 | app.MapHealthChecks("/health"); 109 | 110 | // Only health checks tagged with the "live" tag must pass for app to be considered alive 111 | app.MapHealthChecks("/alive", new HealthCheckOptions 112 | { 113 | Predicate = r => r.Tags.Contains("live") 114 | }); 115 | } 116 | 117 | return app; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /hostedss - ef/AspireApp1.ServiceDefaults/Extensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Diagnostics.HealthChecks; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Diagnostics.HealthChecks; 5 | using Microsoft.Extensions.Logging; 6 | using Microsoft.Extensions.ServiceDiscovery; 7 | using OpenTelemetry; 8 | using OpenTelemetry.Metrics; 9 | using OpenTelemetry.Trace; 10 | 11 | namespace Microsoft.Extensions.Hosting; 12 | 13 | // Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry. 14 | // This project should be referenced by each service project in your solution. 15 | // To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults 16 | public static class Extensions 17 | { 18 | public static TBuilder AddServiceDefaults(this TBuilder builder) where TBuilder : IHostApplicationBuilder 19 | { 20 | builder.ConfigureOpenTelemetry(); 21 | 22 | builder.AddDefaultHealthChecks(); 23 | 24 | builder.Services.AddServiceDiscovery(); 25 | 26 | builder.Services.ConfigureHttpClientDefaults(http => 27 | { 28 | // Turn on resilience by default 29 | http.AddStandardResilienceHandler(); 30 | 31 | // Turn on service discovery by default 32 | http.AddServiceDiscovery(); 33 | }); 34 | 35 | // Uncomment the following to restrict the allowed schemes for service discovery. 36 | // builder.Services.Configure(options => 37 | // { 38 | // options.AllowedSchemes = ["https"]; 39 | // }); 40 | 41 | return builder; 42 | } 43 | 44 | public static TBuilder ConfigureOpenTelemetry(this TBuilder builder) where TBuilder : IHostApplicationBuilder 45 | { 46 | builder.Logging.AddOpenTelemetry(logging => 47 | { 48 | logging.IncludeFormattedMessage = true; 49 | logging.IncludeScopes = true; 50 | }); 51 | 52 | builder.Services.AddOpenTelemetry() 53 | .WithMetrics(metrics => 54 | { 55 | metrics.AddAspNetCoreInstrumentation() 56 | .AddHttpClientInstrumentation() 57 | .AddRuntimeInstrumentation(); 58 | }) 59 | .WithTracing(tracing => 60 | { 61 | tracing.AddSource(builder.Environment.ApplicationName) 62 | .AddAspNetCoreInstrumentation() 63 | // Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package) 64 | //.AddGrpcClientInstrumentation() 65 | .AddHttpClientInstrumentation(); 66 | }); 67 | 68 | builder.AddOpenTelemetryExporters(); 69 | 70 | return builder; 71 | } 72 | 73 | private static TBuilder AddOpenTelemetryExporters(this TBuilder builder) where TBuilder : IHostApplicationBuilder 74 | { 75 | var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]); 76 | 77 | if (useOtlpExporter) 78 | { 79 | builder.Services.AddOpenTelemetry().UseOtlpExporter(); 80 | } 81 | 82 | // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) 83 | //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) 84 | //{ 85 | // builder.Services.AddOpenTelemetry() 86 | // .UseAzureMonitor(); 87 | //} 88 | 89 | return builder; 90 | } 91 | 92 | public static TBuilder AddDefaultHealthChecks(this TBuilder builder) where TBuilder : IHostApplicationBuilder 93 | { 94 | builder.Services.AddHealthChecks() 95 | // Add a default liveness check to ensure app is responsive 96 | .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); 97 | 98 | return builder; 99 | } 100 | 101 | public static WebApplication MapDefaultEndpoints(this WebApplication app) 102 | { 103 | // Adding health checks endpoints to applications in non-development environments has security implications. 104 | // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. 105 | if (app.Environment.IsDevelopment()) 106 | { 107 | // All health checks must pass for app to be considered ready to accept traffic after starting 108 | app.MapHealthChecks("/health"); 109 | 110 | // Only health checks tagged with the "live" tag must pass for app to be considered alive 111 | app.MapHealthChecks("/alive", new HealthCheckOptions 112 | { 113 | Predicate = r => r.Tags.Contains("live") 114 | }); 115 | } 116 | 117 | return app; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /hostedss - dbup - dab/AspireApp1.ServiceDefaults/Extensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Diagnostics.HealthChecks; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Diagnostics.HealthChecks; 5 | using Microsoft.Extensions.Logging; 6 | using Microsoft.Extensions.ServiceDiscovery; 7 | using OpenTelemetry; 8 | using OpenTelemetry.Metrics; 9 | using OpenTelemetry.Trace; 10 | 11 | namespace Microsoft.Extensions.Hosting; 12 | 13 | // Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry. 14 | // This project should be referenced by each service project in your solution. 15 | // To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults 16 | public static class Extensions 17 | { 18 | public static TBuilder AddServiceDefaults(this TBuilder builder) where TBuilder : IHostApplicationBuilder 19 | { 20 | builder.ConfigureOpenTelemetry(); 21 | 22 | builder.AddDefaultHealthChecks(); 23 | 24 | builder.Services.AddServiceDiscovery(); 25 | 26 | builder.Services.ConfigureHttpClientDefaults(http => 27 | { 28 | // Turn on resilience by default 29 | http.AddStandardResilienceHandler(); 30 | 31 | // Turn on service discovery by default 32 | http.AddServiceDiscovery(); 33 | }); 34 | 35 | // Uncomment the following to restrict the allowed schemes for service discovery. 36 | // builder.Services.Configure(options => 37 | // { 38 | // options.AllowedSchemes = ["https"]; 39 | // }); 40 | 41 | return builder; 42 | } 43 | 44 | public static TBuilder ConfigureOpenTelemetry(this TBuilder builder) where TBuilder : IHostApplicationBuilder 45 | { 46 | builder.Logging.AddOpenTelemetry(logging => 47 | { 48 | logging.IncludeFormattedMessage = true; 49 | logging.IncludeScopes = true; 50 | }); 51 | 52 | builder.Services.AddOpenTelemetry() 53 | .WithMetrics(metrics => 54 | { 55 | metrics.AddAspNetCoreInstrumentation() 56 | .AddHttpClientInstrumentation() 57 | .AddRuntimeInstrumentation(); 58 | }) 59 | .WithTracing(tracing => 60 | { 61 | tracing.AddSource(builder.Environment.ApplicationName) 62 | .AddAspNetCoreInstrumentation() 63 | // Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package) 64 | //.AddGrpcClientInstrumentation() 65 | .AddHttpClientInstrumentation(); 66 | }); 67 | 68 | builder.AddOpenTelemetryExporters(); 69 | 70 | return builder; 71 | } 72 | 73 | private static TBuilder AddOpenTelemetryExporters(this TBuilder builder) where TBuilder : IHostApplicationBuilder 74 | { 75 | var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]); 76 | 77 | if (useOtlpExporter) 78 | { 79 | builder.Services.AddOpenTelemetry().UseOtlpExporter(); 80 | } 81 | 82 | // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) 83 | //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) 84 | //{ 85 | // builder.Services.AddOpenTelemetry() 86 | // .UseAzureMonitor(); 87 | //} 88 | 89 | return builder; 90 | } 91 | 92 | public static TBuilder AddDefaultHealthChecks(this TBuilder builder) where TBuilder : IHostApplicationBuilder 93 | { 94 | builder.Services.AddHealthChecks() 95 | // Add a default liveness check to ensure app is responsive 96 | .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); 97 | 98 | return builder; 99 | } 100 | 101 | public static WebApplication MapDefaultEndpoints(this WebApplication app) 102 | { 103 | // Adding health checks endpoints to applications in non-development environments has security implications. 104 | // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. 105 | if (app.Environment.IsDevelopment()) 106 | { 107 | // All health checks must pass for app to be considered ready to accept traffic after starting 108 | app.MapHealthChecks("/health"); 109 | 110 | // Only health checks tagged with the "live" tag must pass for app to be considered alive 111 | app.MapHealthChecks("/alive", new HealthCheckOptions 112 | { 113 | Predicate = r => r.Tags.Contains("live") 114 | }); 115 | } 116 | 117 | return app; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SQL Server Aspire Samples 2 | 3 | A set of samples that show how to integrate SQL Server and Azure SQL with [.NET Aspire](https://learn.microsoft.com/dotnet/aspire/get-started/aspire-overview). 4 | 5 | **Updated to use Aspire 9.5** 6 | 7 | All the samples can now be easily executed via the [Aspire CLI](https://learn.microsoft.com/dotnet/aspire/cli/install?tabs=windows), using the `aspire run` command from each sample folder. 8 | 9 | + [SQL Server Aspire Samples](#sql-server-aspire-samples) 10 | + [Base Sample](#base-sample) 11 | + [Bring-Your-Own-SQL-Server (BYOSS)](#bring-your-own-sql-server-byoss) 12 | + [Aspire-Hosted SQL Server](#aspire-hosted-sql-server) 13 | + [Aspire-Hosted SQL Server + DBUp](#aspire-hosted-sql-server--dbup) 14 | + [Aspire-Hosted SQL Server + Database Project](#aspire-hosted-sql-server--database-project) 15 | + [Aspire-Hosted SQL Server + EF Core](#aspire-hosted-sql-server--ef-core) 16 | + [Aspire-Hosted SQL Server + DbUp + DAB](#aspire-hosted-sql-server--dbup--dab) 17 | + [End-To-End Jamstack "ToDo List" Application](#end-to-end-jamstack-todo-list-application) 18 | 19 | ## Base Sample 20 | 21 | - Folder: [`./base`](./base) 22 | 23 | The basic .Net Aspire application with a simple WebAPI project (WebApplication1) that you can use as a starting point to add support for Azure SQL or SQL Server 24 | 25 | ## Bring-Your-Own-SQL-Server (BYOSS) 26 | 27 | - Folder: [`./byoss`](./byoss) 28 | 29 | The simplest integration of SQL Server in .NET Aspire. It takes the "Base" example and updates the WebAPI so that now it is calling an existing SQL Server, using a provided connectiong string. If you need a free, on-premise SQL Server, you can use the [SQL Server Developer Edition](https://www.microsoft.com/en-us/sql-server/sql-server-downloads) that is free for development and testing. The easiest way to run it is to use the image that you can get using [`sqlcmd`](https://azuresql.dev/content/sql-server-dev-go-sqlcmd): 30 | 31 | ```shell 32 | sqlcmd create mssql --accept-eula 33 | ``` 34 | 35 | Get the ADO.NET connection string from the SQL Server container via: 36 | 37 | ```shell 38 | sqlcmd config cs 39 | ``` 40 | 41 | and then make sure to save it in the user secrets of the `AspireApp1.AppHost` project, so that it can be used by the application. 42 | 43 | ```shell 44 | dotnet user-secrets set 'ConnectionStrings:db' '' 45 | ``` 46 | 47 | ## Aspire-Hosted SQL Server 48 | 49 | - Folder: [`./hostedss`](./hostedss) 50 | 51 | Change the BYOSS sample so the SQL Server is deployed and managed by Aspire orchestration, providing a basic integration with the Aspire environment. SQL Server is deployed in a OCI container by Aspire. No changes to WebAPI project. If you want to set the password for the created SQL Server, you can do it by setting the `Parameters:sqlsrv-password` user secret: 52 | 53 | ```shell 54 | dotnet user-secrets set 'Parameters:sqlsrv-password' '' 55 | ``` 56 | 57 | otherwise a random generated password will be used. Read all the details on Azure SQL and SQL Server integration with Aspire here: [.NET Aspire SQL Server integration](https://learn.microsoft.com/en-us/dotnet/aspire/database/sql-server-integration) 58 | 59 | The integration with Aspire is quite basic in this sample as it is done using only on the server side, introducting usage the `Aspire.Hosting.SqlServer` library in AppHost project. 60 | 61 | The client WebAPI application (Webapplication1) is still getting the connection string from the Aspire-provided environment variable. 62 | 63 | ## Aspire-Hosted SQL Server + DBUp 64 | 65 | - Folder: [`./hostedss - dbup`](./hostedss%20-%20dbup) 66 | 67 | In this sample, which is based on the previous one, deployment of database schema is also added to the solution. 68 | 69 | In addition there is now full integration of SQL Server with the Aspire environment. The client WebAPI application (WebApplication1) is now getting the connection object via Dependency Injection, thanks to the usage of the `Aspire.Microsoft.Data.SqlClient` library. 70 | 71 | The database is deployed using an imperative approach, via the `DbUp` library, that is also orchestrated by Aspire, by a custom application (DatabaseDeploy) that is added to the AppHost project to allow Aspire to orchestrate it. 72 | 73 | ## Aspire-Hosted SQL Server + Database Project 74 | 75 | - Folder: [`./hostedss - dbprj`](./hostedss%20-%20dbprj) 76 | 77 | Similar to the previous sample, but the database is deployed using a declarative approach, using a [SDK-Style Database Project](https://techcommunity.microsoft.com/blog/azuresqlblog/the-microsoft-build-sql-project-sdk-is-now-generally-available/4392063), that is also orchestrated by Aspire, via the community extension `CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects`. 78 | 79 | ## Aspire-Hosted SQL Server + EF Core 80 | 81 | - Folder: [`./hostedss - ef`](./hostedss%20-%20ef) 82 | 83 | In this sample, the client application (Webapplication1) is now using Entity Framework Core to interact with the SQL Server. The EF Core database context is provided via Dependency Injection, thanks to the usage of the library: `Aspire.Microsoft.EntityFrameworkCore.SqlServer`. 84 | 85 | The database is deployed using a EF Core database migrations, that are deployed with the support of a Worker Service, as explained in the Aspire documentation ["Apply Entity Framework Core migrations in .NET Aspire"](https://learn.microsoft.com/en-us/dotnet/aspire/database/ef-core-migrations). 86 | 87 | Please note that to keep the sample as simple as possible the EF Core entities and migrations have been defined directly in the WebApplication1 solution, which is not a best practice for a real-world application. A dedicated project should be created for the EF Core entities and migrations. 88 | 89 | > [!NOTE] 90 | > This example uses `Aspire.Hosting.Azure.Sql` so that it can be **deployed in Azure** via `azd up` and an Azure SQL DB will be created and the database schema will be deployed. 91 | 92 | ## Aspire-Hosted SQL Server + DbUp + DAB 93 | 94 | - Folder: [`./hostedss - dbup - dab`](./hostedss%20-%20dbup%20-%20dab) 95 | 96 | In this sample, taken from the `./hostedss - dbup` sample, add [Data API Builder (DAB)](https://aka.ms/dab) to the solution, so that the database can be exposed as a REST and GraphQL API, so there is no need anymore to manuallly create a CRUD API and therefore the WebAPI project is removed. 97 | 98 | DAB is orchestrated by Aspire, via the community extension `CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder`, that has been added to the AppHost project. 99 | 100 | ## End-To-End Jamstack "ToDo List" Application 101 | 102 | - Folder: [`./todo_app`](./todo_app) 103 | 104 | Full end-to-end example of a Jamstack application, with a Vue front-end, a Data API Builder back-end, and SQL Server database, deployed using a [SDK-Style Database Project](https://techcommunity.microsoft.com/blog/azuresqlblog/the-microsoft-build-sql-project-sdk-is-now-generally-available/4392063). Everything is orchestrated by Aspire, including the Node application (TodoApp.Frontend), thanks to the `CommunityToolkit.Aspire.Hosting.NodeJS.Extensions` library. 105 | 106 | You can run the application, either via Visual Studio or Visual Studio Code or the command line: 107 | 108 | ```shell 109 | aspire run 110 | ``` 111 | 112 | if for some reason you get an error about `.dacpac` file not being available, build the .dacpac manually by runnig the following command to build the database project: 113 | 114 | ```shell 115 | cd .\TodoApp.Database\ 116 | dotnet build 117 | ``` 118 | 119 | -------------------------------------------------------------------------------- /todo_app/TodoApp.Frontend/src/components/ToDoList.vue: -------------------------------------------------------------------------------- 1 | 46 | 47 | 263 | 264 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # ASP.NET Scaffolding 66 | ScaffoldingReadMe.txt 67 | 68 | # StyleCop 69 | StyleCopReport.xml 70 | 71 | # Files built by Visual Studio 72 | *_i.c 73 | *_p.c 74 | *_h.h 75 | *.ilk 76 | *.meta 77 | *.obj 78 | *.iobj 79 | *.pch 80 | *.pdb 81 | *.ipdb 82 | *.pgc 83 | *.pgd 84 | *.rsp 85 | # but not Directory.Build.rsp, as it configures directory-level build defaults 86 | !Directory.Build.rsp 87 | *.sbr 88 | *.tlb 89 | *.tli 90 | *.tlh 91 | *.tmp 92 | *.tmp_proj 93 | *_wpftmp.csproj 94 | *.log 95 | *.tlog 96 | *.vspscc 97 | *.vssscc 98 | .builds 99 | *.pidb 100 | *.svclog 101 | *.scc 102 | 103 | # Chutzpah Test files 104 | _Chutzpah* 105 | 106 | # Visual C++ cache files 107 | ipch/ 108 | *.aps 109 | *.ncb 110 | *.opendb 111 | *.opensdf 112 | *.sdf 113 | *.cachefile 114 | *.VC.db 115 | *.VC.VC.opendb 116 | 117 | # Visual Studio profiler 118 | *.psess 119 | *.vsp 120 | *.vspx 121 | *.sap 122 | 123 | # Visual Studio Trace Files 124 | *.e2e 125 | 126 | # TFS 2012 Local Workspace 127 | $tf/ 128 | 129 | # Guidance Automation Toolkit 130 | *.gpState 131 | 132 | # ReSharper is a .NET coding add-in 133 | _ReSharper*/ 134 | *.[Rr]e[Ss]harper 135 | *.DotSettings.user 136 | 137 | # TeamCity is a build add-in 138 | _TeamCity* 139 | 140 | # DotCover is a Code Coverage Tool 141 | *.dotCover 142 | 143 | # AxoCover is a Code Coverage Tool 144 | .axoCover/* 145 | !.axoCover/settings.json 146 | 147 | # Coverlet is a free, cross platform Code Coverage Tool 148 | coverage*.json 149 | coverage*.xml 150 | coverage*.info 151 | 152 | # Visual Studio code coverage results 153 | *.coverage 154 | *.coveragexml 155 | 156 | # NCrunch 157 | _NCrunch_* 158 | .*crunch*.local.xml 159 | nCrunchTemp_* 160 | 161 | # MightyMoose 162 | *.mm.* 163 | AutoTest.Net/ 164 | 165 | # Web workbench (sass) 166 | .sass-cache/ 167 | 168 | # Installshield output folder 169 | [Ee]xpress/ 170 | 171 | # DocProject is a documentation generator add-in 172 | DocProject/buildhelp/ 173 | DocProject/Help/*.HxT 174 | DocProject/Help/*.HxC 175 | DocProject/Help/*.hhc 176 | DocProject/Help/*.hhk 177 | DocProject/Help/*.hhp 178 | DocProject/Help/Html2 179 | DocProject/Help/html 180 | 181 | # Click-Once directory 182 | publish/ 183 | 184 | # Publish Web Output 185 | *.[Pp]ublish.xml 186 | *.azurePubxml 187 | # Note: Comment the next line if you want to checkin your web deploy settings, 188 | # but database connection strings (with potential passwords) will be unencrypted 189 | *.pubxml 190 | *.publishproj 191 | 192 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 193 | # checkin your Azure Web App publish settings, but sensitive information contained 194 | # in these scripts will be unencrypted 195 | PublishScripts/ 196 | 197 | # NuGet Packages 198 | *.nupkg 199 | # NuGet Symbol Packages 200 | *.snupkg 201 | # The packages folder can be ignored because of Package Restore 202 | **/[Pp]ackages/* 203 | # except build/, which is used as an MSBuild target. 204 | !**/[Pp]ackages/build/ 205 | # Uncomment if necessary however generally it will be regenerated when needed 206 | #!**/[Pp]ackages/repositories.config 207 | # NuGet v3's project.json files produces more ignorable files 208 | *.nuget.props 209 | *.nuget.targets 210 | 211 | # Microsoft Azure Build Output 212 | csx/ 213 | *.build.csdef 214 | 215 | # Microsoft Azure Emulator 216 | ecf/ 217 | rcf/ 218 | 219 | # Windows Store app package directories and files 220 | AppPackages/ 221 | BundleArtifacts/ 222 | Package.StoreAssociation.xml 223 | _pkginfo.txt 224 | *.appx 225 | *.appxbundle 226 | *.appxupload 227 | 228 | # Visual Studio cache files 229 | # files ending in .cache can be ignored 230 | *.[Cc]ache 231 | # but keep track of directories ending in .cache 232 | !?*.[Cc]ache/ 233 | 234 | # Others 235 | ClientBin/ 236 | ~$* 237 | *~ 238 | *.dbmdl 239 | *.dbproj.schemaview 240 | *.jfm 241 | *.pfx 242 | *.publishsettings 243 | orleans.codegen.cs 244 | 245 | # Including strong name files can present a security risk 246 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 247 | #*.snk 248 | 249 | # Since there are multiple workflows, uncomment next line to ignore bower_components 250 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 251 | #bower_components/ 252 | 253 | # RIA/Silverlight projects 254 | Generated_Code/ 255 | 256 | # Backup & report files from converting an old project file 257 | # to a newer Visual Studio version. Backup files are not needed, 258 | # because we have git ;-) 259 | _UpgradeReport_Files/ 260 | Backup*/ 261 | UpgradeLog*.XML 262 | UpgradeLog*.htm 263 | ServiceFabricBackup/ 264 | *.rptproj.bak 265 | 266 | # SQL Server files 267 | *.mdf 268 | *.ldf 269 | *.ndf 270 | 271 | # Business Intelligence projects 272 | *.rdl.data 273 | *.bim.layout 274 | *.bim_*.settings 275 | *.rptproj.rsuser 276 | *- [Bb]ackup.rdl 277 | *- [Bb]ackup ([0-9]).rdl 278 | *- [Bb]ackup ([0-9][0-9]).rdl 279 | 280 | # Microsoft Fakes 281 | FakesAssemblies/ 282 | 283 | # GhostDoc plugin setting file 284 | *.GhostDoc.xml 285 | 286 | # Node.js Tools for Visual Studio 287 | .ntvs_analysis.dat 288 | node_modules/ 289 | 290 | # Visual Studio 6 build log 291 | *.plg 292 | 293 | # Visual Studio 6 workspace options file 294 | *.opt 295 | 296 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 297 | *.vbw 298 | 299 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 300 | *.vbp 301 | 302 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 303 | *.dsw 304 | *.dsp 305 | 306 | # Visual Studio 6 technical files 307 | *.ncb 308 | *.aps 309 | 310 | # Visual Studio LightSwitch build output 311 | **/*.HTMLClient/GeneratedArtifacts 312 | **/*.DesktopClient/GeneratedArtifacts 313 | **/*.DesktopClient/ModelManifest.xml 314 | **/*.Server/GeneratedArtifacts 315 | **/*.Server/ModelManifest.xml 316 | _Pvt_Extensions 317 | 318 | # Paket dependency manager 319 | .paket/paket.exe 320 | paket-files/ 321 | 322 | # FAKE - F# Make 323 | .fake/ 324 | 325 | # CodeRush personal settings 326 | .cr/personal 327 | 328 | # Python Tools for Visual Studio (PTVS) 329 | __pycache__/ 330 | *.pyc 331 | 332 | # Cake - Uncomment if you are using it 333 | # tools/** 334 | # !tools/packages.config 335 | 336 | # Tabs Studio 337 | *.tss 338 | 339 | # Telerik's JustMock configuration file 340 | *.jmconfig 341 | 342 | # BizTalk build output 343 | *.btp.cs 344 | *.btm.cs 345 | *.odx.cs 346 | *.xsd.cs 347 | 348 | # OpenCover UI analysis results 349 | OpenCover/ 350 | 351 | # Azure Stream Analytics local run output 352 | ASALocalRun/ 353 | 354 | # MSBuild Binary and Structured Log 355 | *.binlog 356 | 357 | # NVidia Nsight GPU debugger configuration file 358 | *.nvuser 359 | 360 | # MFractors (Xamarin productivity tool) working folder 361 | .mfractor/ 362 | 363 | # Local History for Visual Studio 364 | .localhistory/ 365 | 366 | # Visual Studio History (VSHistory) files 367 | .vshistory/ 368 | 369 | # BeatPulse healthcheck temp database 370 | healthchecksdb 371 | 372 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 373 | MigrationBackup/ 374 | 375 | # Ionide (cross platform F# VS Code tools) working folder 376 | .ionide/ 377 | 378 | # Fody - auto-generated XML schema 379 | FodyWeavers.xsd 380 | 381 | # VS Code files for those working on multiple tools 382 | .vscode/* 383 | !.vscode/settings.json 384 | !.vscode/tasks.json 385 | !.vscode/launch.json 386 | !.vscode/extensions.json 387 | *.code-workspace 388 | 389 | # Local History for Visual Studio Code 390 | .history/ 391 | 392 | # Windows Installer files from build outputs 393 | *.cab 394 | *.msi 395 | *.msix 396 | *.msm 397 | *.msp 398 | 399 | # JetBrains Rider 400 | *.sln.iml 401 | 402 | # Custom 403 | .env 404 | .aspire/ --------------------------------------------------------------------------------