├── 6-containers ├── MunsonPickles.Web │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json │ │ └── launchSettings.json │ ├── wwwroot │ │ ├── favicon.png │ │ └── css │ │ │ └── open-iconic │ │ │ ├── font │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ └── ICON-LICENSE │ ├── Pages │ │ ├── Index.razor │ │ ├── Error.cshtml.cs │ │ ├── ReviewDetails.razor │ │ └── ProductDetails.razor │ ├── appsettings.Development.json │ ├── Shared │ │ ├── LoginDisplay.razor │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ ├── _Imports.razor │ ├── App.razor │ ├── Services │ │ └── ProductService.cs │ ├── Dockerfile │ ├── appsettings.json │ ├── Components │ │ └── ProductReviews.razor │ └── MunsonPickles.Web.csproj ├── MunsonPickles.Api │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Data │ │ ├── Extensions.cs │ │ └── PickleDbContext.cs │ ├── Services │ │ └── ProductService.cs │ ├── Dockerfile │ └── MunsonPickles.Api.csproj ├── MunsonPickles.Shared │ ├── MunsonPickles.Shared.csproj │ ├── Models │ │ ├── ProductType.cs │ │ ├── ReviewPhoto.cs │ │ ├── Review.cs │ │ └── Product.cs │ └── Transfer │ │ └── NewReview.cs └── .dockerignore ├── 7-functions ├── MunsonPickles.Web │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json │ │ └── launchSettings.json │ ├── wwwroot │ │ ├── favicon.png │ │ └── css │ │ │ └── open-iconic │ │ │ ├── font │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ └── ICON-LICENSE │ ├── Pages │ │ ├── Index.razor │ │ ├── Error.cshtml.cs │ │ ├── ReviewDetails.razor │ │ └── ProductDetails.razor │ ├── appsettings.Development.json │ ├── Shared │ │ ├── LoginDisplay.razor │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ ├── _Imports.razor │ ├── App.razor │ ├── Services │ │ └── ProductService.cs │ ├── Dockerfile │ ├── Components │ │ ├── ProductReviews.razor │ │ └── ProductList.razor │ ├── appsettings.json │ └── MunsonPickles.Web.csproj ├── MunsonPickles.Functions │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.local.json │ │ └── launchSettings.json │ ├── host.json │ └── MunsonPickles.Functions.csproj ├── MunsonPickles.Api │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Data │ │ ├── Extensions.cs │ │ └── PickleDbContext.cs │ ├── Services │ │ └── ProductService.cs │ ├── Dockerfile │ └── MunsonPickles.Api.csproj ├── MunsonPickles.Shared │ ├── MunsonPickles.Shared.csproj │ ├── Models │ │ ├── ProductType.cs │ │ ├── ReviewPhoto.cs │ │ ├── Review.cs │ │ └── Product.cs │ └── Transfer │ │ └── NewReview.cs └── MunsonPickleFunctions.sln ├── 5-managed-identity ├── MunsonPickles.Web │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json │ │ └── launchSettings.json │ ├── wwwroot │ │ ├── favicon.png │ │ └── css │ │ │ └── open-iconic │ │ │ ├── font │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ └── ICON-LICENSE │ ├── Pages │ │ ├── Index.razor │ │ ├── Error.cshtml.cs │ │ ├── ReviewDetails.razor │ │ └── ProductDetails.razor │ ├── appsettings.Development.json │ ├── Shared │ │ ├── LoginDisplay.razor │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ ├── _Imports.razor │ ├── App.razor │ ├── Services │ │ └── ProductService.cs │ ├── appsettings.json │ ├── Components │ │ ├── ProductReviews.razor │ │ └── ProductList.razor │ └── MunsonPickles.Web.csproj ├── MunsonPickles.Api │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Data │ │ ├── Extensions.cs │ │ └── PickleDbContext.cs │ ├── Services │ │ └── ProductService.cs │ ├── MunsonPickles.Api.csproj │ └── Properties │ │ └── launchSettings.json └── MunsonPickles.Shared │ ├── MunsonPickles.Shared.csproj │ ├── Models │ ├── ProductType.cs │ ├── ReviewPhoto.cs │ ├── Review.cs │ └── Product.cs │ └── Transfer │ └── NewReview.cs ├── 4-identity-implemented-api ├── MunsonPickles.Web │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json │ │ └── launchSettings.json │ ├── wwwroot │ │ ├── favicon.png │ │ └── css │ │ │ └── open-iconic │ │ │ ├── font │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ └── ICON-LICENSE │ ├── Pages │ │ ├── Index.razor │ │ ├── Error.cshtml.cs │ │ ├── ReviewDetails.razor │ │ └── ProductDetails.razor │ ├── Shared │ │ ├── LoginDisplay.razor │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ ├── appsettings.Development.json │ ├── _Imports.razor │ ├── App.razor │ ├── Services │ │ └── ProductService.cs │ ├── appsettings.json │ ├── MunsonPickles.Web.csproj │ └── Components │ │ ├── ProductReviews.razor │ │ └── ProductList.razor ├── MunsonPickles.Api │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Data │ │ ├── Extensions.cs │ │ └── PickleDbContext.cs │ ├── Services │ │ └── ProductService.cs │ ├── MunsonPickles.Api.csproj │ └── Properties │ │ └── launchSettings.json └── MunsonPickles.Shared │ ├── MunsonPickles.Shared.csproj │ ├── Models │ ├── ProductType.cs │ ├── ReviewPhoto.cs │ ├── Review.cs │ └── Product.cs │ └── Transfer │ └── NewReview.cs ├── 4-identity └── MunsonPickles │ ├── MunsonPickles.Web │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json │ │ └── launchSettings.json │ ├── wwwroot │ │ ├── favicon.png │ │ └── css │ │ │ └── open-iconic │ │ │ ├── font │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ └── ICON-LICENSE │ ├── appsettings.json │ ├── Pages │ │ ├── Index.razor │ │ ├── Error.cshtml.cs │ │ ├── ReviewDetails.razor │ │ └── ProductDetails.razor │ ├── appsettings.Development.json │ ├── App.razor │ ├── Shared │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ ├── _Imports.razor │ ├── Services │ │ ├── ProductService.cs │ │ └── ReviewService.cs │ ├── MunsonPickles.Web.csproj │ └── Components │ │ ├── ProductReviews.razor │ │ └── ProductList.razor │ ├── MunsonPickles.Api │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Data │ │ ├── Extensions.cs │ │ └── PickleDbContext.cs │ ├── MunsonPickles.Api.csproj │ ├── Services │ │ └── ProductService.cs │ └── Properties │ │ └── launchSettings.json │ └── MunsonPickles.Shared │ ├── MunsonPickles.Shared.csproj │ ├── Models │ ├── ReviewPhoto.cs │ ├── ProductType.cs │ ├── Review.cs │ └── Product.cs │ └── Transfer │ └── NewReview.cs ├── 2-deploy-and-data └── MunsonPickles │ ├── MunsonPickles.Web │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json │ │ └── launchSettings.json │ ├── wwwroot │ │ ├── favicon.png │ │ └── css │ │ │ └── open-iconic │ │ │ ├── font │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ └── ICON-LICENSE │ ├── Models │ │ ├── ProductType.cs │ │ ├── ReviewPhoto.cs │ │ ├── Review.cs │ │ └── Product.cs │ ├── Pages │ │ ├── Index.razor │ │ ├── Error.cshtml.cs │ │ └── ProductDetails.razor │ ├── appsettings.json │ ├── appsettings.Development.json │ ├── Shared │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ ├── App.razor │ ├── Data │ │ ├── Extensions.cs │ │ └── PickleDbContext.cs │ ├── MunsonPickles.Web.csproj │ ├── _Imports.razor │ ├── Services │ │ └── ProductService.cs │ ├── Components │ │ ├── ProductReviews.razor │ │ └── ProductList.razor │ └── Program.cs │ └── MunsonPickles.sln ├── 3-blob-storage └── MunsonPickles │ ├── MunsonPickles.Web │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json │ │ └── launchSettings.json │ ├── wwwroot │ │ ├── favicon.png │ │ └── css │ │ │ └── open-iconic │ │ │ ├── font │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ └── ICON-LICENSE │ ├── Models │ │ ├── ProductType.cs │ │ ├── ReviewPhoto.cs │ │ ├── Review.cs │ │ └── Product.cs │ ├── Pages │ │ ├── Index.razor │ │ ├── Error.cshtml.cs │ │ ├── ReviewDetails.razor │ │ └── ProductDetails.razor │ ├── appsettings.json │ ├── appsettings.Development.json │ ├── Shared │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ ├── App.razor │ ├── Data │ │ ├── Extensions.cs │ │ └── PickleDbContext.cs │ ├── _Imports.razor │ ├── MunsonPickles.Web.csproj │ ├── Services │ │ └── ProductService.cs │ └── Components │ │ ├── ProductReviews.razor │ │ └── ProductList.razor │ └── MunsonPickles.sln ├── 4-identity-implemented └── MunsonPickles │ ├── MunsonPickles.Web │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json │ │ └── launchSettings.json │ ├── wwwroot │ │ ├── favicon.png │ │ └── css │ │ │ └── open-iconic │ │ │ ├── font │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ └── ICON-LICENSE │ ├── Pages │ │ ├── Index.razor │ │ ├── Error.cshtml.cs │ │ ├── ReviewDetails.razor │ │ └── ProductDetails.razor │ ├── appsettings.Development.json │ ├── Shared │ │ ├── LoginDisplay.razor │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ ├── appsettings.json │ ├── _Imports.razor │ ├── App.razor │ ├── Services │ │ ├── ProductService.cs │ │ └── ReviewService.cs │ ├── MunsonPickles.Web.csproj │ └── Components │ │ ├── ProductReviews.razor │ │ └── ProductList.razor │ ├── MunsonPickles.Api │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Data │ │ ├── Extensions.cs │ │ └── PickleDbContext.cs │ ├── MunsonPickles.Api.csproj │ ├── Services │ │ └── ProductService.cs │ └── Properties │ │ └── launchSettings.json │ └── MunsonPickles.Shared │ ├── MunsonPickles.Shared.csproj │ ├── Models │ ├── ProductType.cs │ ├── ReviewPhoto.cs │ ├── Review.cs │ └── Product.cs │ └── Transfer │ └── NewReview.cs ├── README.md └── LICENSE /6-containers/MunsonPickles.Web/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # beginner-dotnet-on-azure 2 | Samples and demos that go along with the Beginner's Series to .NET on Azure 3 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Properties/serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Properties/serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Properties/serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Properties/serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Properties/serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Properties/serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Properties/serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Properties/serviceDependencies.app-dotzure-eastus-dev-002 - Web Deploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/6-containers/MunsonPickles.Web/wwwroot/favicon.png -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/7-functions/MunsonPickles.Web/wwwroot/favicon.png -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Functions/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "appInsights1": { 4 | "type": "appInsights" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/5-managed-identity/MunsonPickles.Web/wwwroot/favicon.png -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Functions/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "appInsights1": { 4 | "type": "appInsights.sdk" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity/MunsonPickles/MunsonPickles.Web/wwwroot/favicon.png -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity-implemented-api/MunsonPickles.Web/wwwroot/favicon.png -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/3-blob-storage/MunsonPickles/MunsonPickles.Web/wwwroot/favicon.png -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/2-deploy-and-data/MunsonPickles/MunsonPickles.Web/wwwroot/favicon.png -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Api/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Api/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Api/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity-implemented/MunsonPickles/MunsonPickles.Web/wwwroot/favicon.png -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Api/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Api/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/7-functions/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/7-functions/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/7-functions/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Api/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/6-containers/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/6-containers/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/6-containers/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/6-containers/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/7-functions/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | 4 | Munson Pickles Preserves 5 | 6 |

Welcome to Munson's Pickle and Preserves

7 | 8 | 9 | 10 | @code { 11 | 12 | } -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | 4 | Munson Pickles Preserves 5 | 6 |

Welcome to Munson's Pickle and Preserves

7 | 8 | 9 | 10 | @code { 11 | 12 | } -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Models/ProductType.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Web.Models; 2 | 3 | public class ProductType 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } = string.Empty; 7 | } 8 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Api/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/5-managed-identity/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/5-managed-identity/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/5-managed-identity/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Models/ProductType.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Web.Models; 2 | 3 | public class ProductType 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } = string.Empty; 7 | } 8 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Models/ReviewPhoto.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Web.Models; 2 | 3 | public class ReviewPhoto 4 | { 5 | public int Id { get; set; } 6 | public string PhotoUrl { get; set; } = string.Empty; 7 | } 8 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Munson Pickles Preserves 4 | 5 |

Welcome to Munson's Pickle and Preserves

6 | 7 | 8 | 9 | @code { 10 | 11 | } -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Munson Pickles Preserves 4 | 5 |

Welcome to Munson's Pickle and Preserves

6 | 7 | 8 | 9 | @code { 10 | 11 | } -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | 4 | Munson Pickles Preserves 5 | 6 |

Welcome to Munson's Pickle and Preserves

7 | 8 | 9 | 10 | @code { 11 | 12 | } -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/5-managed-identity/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Models/ReviewPhoto.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Web.Models; 2 | 3 | public class ReviewPhoto 4 | { 5 | public int Id { get; set; } 6 | public string PhotoUrl { get; set; } = string.Empty; 7 | } 8 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Munson Pickles Preserves 4 | 5 |

Welcome to Munson's Pickle and Preserves

6 | 7 | 8 | 9 | @code { 10 | 11 | } -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | 4 | Munson Pickles Preserves 5 | 6 |

Welcome to Munson's Pickle and Preserves

7 | 8 | 9 | 10 | @code { 11 | 12 | } -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity-implemented-api/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity-implemented-api/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity-implemented-api/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Api/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Munson Pickles Preserves 4 | 5 |

Welcome to Munson's Pickle and Preserves

6 | 7 | 8 | 9 | @code { 10 | 11 | } -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Functions/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "MunsonPickles.Functions": { 4 | "commandName": "Project", 5 | "commandLineArgs": "--port 7080", 6 | "launchBrowser": false 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/3-blob-storage/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/3-blob-storage/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/3-blob-storage/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity-implemented-api/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/2-deploy-and-data/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/2-deploy-and-data/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/2-deploy-and-data/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/3-blob-storage/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/2-deploy-and-data/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity-implemented/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity-implemented/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity-implemented/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/beginner-dotnet-on-azure/HEAD/4-identity-implemented/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Shared/MunsonPickles.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Functions/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "logging": { 4 | "applicationInsights": { 5 | "samplingSettings": { 6 | "isEnabled": true, 7 | "excludedTypes": "Request" 8 | } 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Shared/MunsonPickles.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Shared/MunsonPickles.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Shared/MunsonPickles.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Shared/MunsonPickles.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Shared/MunsonPickles.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | }, 9 | "Cdn": { 10 | "Endpoint": "https://cdne-dotazure-002.azureedge.net" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Shared/Models/ProductType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ProductType 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | } 14 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Shared/Models/ReviewPhoto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ReviewPhoto 10 | { 11 | public int Id { get; set; } 12 | public string PhotoUrl { get; set; } = string.Empty; 13 | } -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Shared/Models/ProductType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ProductType 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | } 14 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Shared/Models/ReviewPhoto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ReviewPhoto 10 | { 11 | public int Id { get; set; } 12 | public string PhotoUrl { get; set; } = string.Empty; 13 | } -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Shared/Models/ProductType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ProductType 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | } 14 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Shared/Models/ReviewPhoto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ReviewPhoto 10 | { 11 | public int Id { get; set; } 12 | public string PhotoUrl { get; set; } = string.Empty; 13 | } -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Shared/Models/ReviewPhoto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ReviewPhoto 10 | { 11 | public int Id { get; set; } 12 | public string PhotoUrl { get; set; } = string.Empty; 13 | } -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Shared/Models/ProductType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ProductType 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | } 14 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Shared/Models/ReviewPhoto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ReviewPhoto 10 | { 11 | public int Id { get; set; } 12 | public string PhotoUrl { get; set; } = string.Empty; 13 | } -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Shared/Models/ProductType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ProductType 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | } 14 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Shared/Models/ProductType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ProductType 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | } 14 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Shared/Models/ReviewPhoto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class ReviewPhoto 10 | { 11 | public int Id { get; set; } 12 | public string PhotoUrl { get; set; } = string.Empty; 13 | } -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Models/Review.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Web.Models; 2 | 3 | public class Review 4 | { 5 | public int Id { get; set; } 6 | public DateTime Date { get; set; } 7 | public string? UserId { get; set; } 8 | public string Text { get; set; } = string.Empty; 9 | public Product? Product { get; set; } 10 | public ICollection? Photos { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Models/Review.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Web.Models; 2 | 3 | public class Review 4 | { 5 | public int Id { get; set; } 6 | public DateTime Date { get; set; } 7 | public string? UserId { get; set; } 8 | public string Text { get; set; } = string.Empty; 9 | public Product? Product { get; set; } 10 | public ICollection? Photos { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Models/Product.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Web.Models; 2 | 3 | public class Product 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } = string.Empty; 7 | public string? Description { get; set; } 8 | public string? PhotoUrl { get; set; } 9 | public ProductType? ProductType { get; set; } 10 | public ICollection? Reviews { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Models/Product.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Web.Models; 2 | 3 | public class Product 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } = string.Empty; 7 | public string? Description { get; set; } 8 | public string? PhotoUrl { get; set; } 9 | public ProductType? ProductType { get; set; } 10 | public ICollection? Reviews { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /6-containers/.dockerignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.dockerignore 3 | **/.env 4 | **/.git 5 | **/.gitignore 6 | **/.project 7 | **/.settings 8 | **/.toolstarget 9 | **/.vs 10 | **/.vscode 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/azds.yaml 15 | **/bin 16 | **/charts 17 | **/docker-compose* 18 | **/Dockerfile* 19 | **/node_modules 20 | **/npm-debug.log 21 | **/obj 22 | **/secrets.dev.yaml 23 | **/values.dev.yaml 24 | LICENSE 25 | README.md -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Shared/LoginDisplay.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.Identity.Web 2 | @using Microsoft.Extensions.Options 3 | 4 | 5 | 6 | Hello, @context.User.Identity?.Name! 7 | Log out 8 | 9 | 10 | Log in 11 | 12 | 13 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Shared/LoginDisplay.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.Identity.Web 2 | @using Microsoft.Extensions.Options 3 | 4 | 5 | 6 | Hello, @context.User.Identity?.Name! 7 | Log out 8 | 9 | 10 | Log in 11 | 12 | 13 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Shared/LoginDisplay.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.Identity.Web 2 | @using Microsoft.Extensions.Options 3 | 4 | 5 | 6 | Hello, @context.User.Identity?.Name! 7 | Log out 8 | 9 | 10 | Log in 11 | 12 | 13 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Shared/LoginDisplay.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.Identity.Web 2 | @using Microsoft.Extensions.Options 3 | 4 | 5 | 6 | Hello, @context.User.Identity?.Name! 7 | Log out 8 | 9 | 10 | Log in 11 | 12 | 13 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | }, 9 | "Cdn": { 10 | "Endpoint": "https://cdne-dotazure-002.azureedge.net" 11 | }, 12 | "Api": { 13 | "ReviewEndpoint": "https://localhost:7169", 14 | "ProductEndpoint": "https://localhost:7169" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Shared/Transfer/NewReview.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Transfer; 8 | 9 | public class NewReview 10 | { 11 | public string ReviewText { get; set; } = string.Empty; 12 | public int ProductId { get; set; } = 0; 13 | public List PhotoUrls { get; set; }= new List(); 14 | } 15 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | }, 9 | "Cdn": { 10 | "Endpoint": "https://cdne-dotazure-002.azureedge.net" 11 | }, 12 | "Api": { 13 | "ReviewEndpoint": "https://localhost:7169", 14 | "ProductEndpoint": "https://localhost:7169" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Shared/Transfer/NewReview.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Transfer; 8 | 9 | public class NewReview 10 | { 11 | public string ReviewText { get; set; } = string.Empty; 12 | public int ProductId { get; set; } = 0; 13 | public List PhotoUrls { get; set; }= new List(); 14 | } 15 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Shared/Transfer/NewReview.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Transfer; 8 | 9 | public class NewReview 10 | { 11 | public string ReviewText { get; set; } = string.Empty; 12 | public int ProductId { get; set; } = 0; 13 | public List PhotoUrls { get; set; }= new List(); 14 | } 15 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Shared/Transfer/NewReview.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Transfer; 8 | 9 | public class NewReview 10 | { 11 | public string ReviewText { get; set; } = string.Empty; 12 | public int ProductId { get; set; } = 0; 13 | public List PhotoUrls { get; set; }= new List(); 14 | } 15 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | }, 9 | "Cdn": { 10 | "Endpoint": "https://cdne-dotazure-002.azureedge.net" 11 | }, 12 | "Api": { 13 | "ReviewEndpoint": "https://localhost:7169", 14 | "ProductEndpoint": "https://localhost:7169" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Shared/Transfer/NewReview.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Transfer; 8 | 9 | public class NewReview 10 | { 11 | public string ReviewText { get; set; } = string.Empty; 12 | public int ProductId { get; set; } = 0; 13 | public List PhotoUrls { get; set; }= new List(); 14 | } 15 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Shared/Transfer/NewReview.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Transfer; 8 | 9 | public class NewReview 10 | { 11 | public string ReviewText { get; set; } = string.Empty; 12 | public int ProductId { get; set; } = 0; 13 | public List PhotoUrls { get; set; }= new List(); 14 | } 15 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Api/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureAdB2C": { 3 | "Instance": "https://dotazure002.b2clogin.com/", 4 | "ClientId": "47542266-a8ac-415a-bfec-a73d5c1eb0ff", 5 | "Domain": "dotazure002.onmicrosoft.com", 6 | "Scopes": "access_as_user", 7 | "SignUpSignInPolicyId": "B2C_1_SignUpIn" 8 | }, 9 | "Logging": { 10 | "LogLevel": { 11 | "Default": "Information", 12 | "Microsoft.AspNetCore": "Warning" 13 | } 14 | }, 15 | "AllowedHosts": "*" 16 | } 17 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Api/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureAdB2C": { 3 | "Instance": "https://munsonpickles.b2clogin.com/", 4 | "ClientId": "f7c13dc3-a07d-4951-9f6c-a941befaf415", 5 | "Domain": "munsonpickles.onmicrosoft.com", 6 | "Scopes": "access_as_user", 7 | "SignUpSignInPolicyId": "B2C_1_SignUpIn" 8 | }, 9 | "Logging": { 10 | "LogLevel": { 11 | "Default": "Information", 12 | "Microsoft.AspNetCore": "Warning" 13 | } 14 | }, 15 | "AllowedHosts": "*" 16 | } 17 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Api/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureAdB2C": { 3 | "Instance": "https://dotazure002.b2clogin.com/", 4 | "ClientId": "47542266-a8ac-415a-bfec-a73d5c1eb0ff", 5 | "Domain": "dotazure002.onmicrosoft.com", 6 | "Scopes": "access_as_user", 7 | "SignUpSignInPolicyId": "B2C_1_SignUpIn" 8 | }, 9 | "Logging": { 10 | "LogLevel": { 11 | "Default": "Information", 12 | "Microsoft.AspNetCore": "Warning" 13 | } 14 | }, 15 | "AllowedHosts": "*" 16 | } 17 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Api/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureAdB2C": { 3 | "Instance": "https://dotazure002.b2clogin.com/", 4 | "ClientId": "47542266-a8ac-415a-bfec-a73d5c1eb0ff", 5 | "Domain": "dotazure002.onmicrosoft.com", 6 | "Scopes": "access_as_user", 7 | "SignUpSignInPolicyId": "B2C_1_SignUpIn" 8 | }, 9 | "Logging": { 10 | "LogLevel": { 11 | "Default": "Information", 12 | "Microsoft.AspNetCore": "Warning" 13 | } 14 | }, 15 | "AllowedHosts": "*" 16 | } 17 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | Munson Pickles and Preserves 4 | 5 |
6 | 9 | 10 |
11 |
12 | About (data) 13 |
14 | 15 |
16 | @Body 17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | Munson Pickles and Preserves 4 | 5 |
6 | 9 | 10 |
11 |
12 | About (blob) 13 |
14 | 15 |
16 | @Body 17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Not found 8 | 9 |

Sorry, there's nothing at this address.

10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | Munson Pickles and Preserves 4 | 5 |
6 | 9 | 10 |
11 |
12 | About (identity) 13 |
14 | 15 |
16 | @Body 17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Not found 8 | 9 |

Sorry, there's nothing at this address.

10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Not found 8 | 9 |

Sorry, there's nothing at this address.

10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Api/Data/Extensions.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Api.Data; 2 | 3 | public static class Extensions 4 | { 5 | public static void CreateDbIfNotExists(this IHost host) 6 | { 7 | using var scope = host.Services.CreateScope(); 8 | 9 | var services = scope.ServiceProvider; 10 | var pickleContext = services.GetRequiredService(); 11 | 12 | pickleContext.Database.EnsureCreated(); 13 | 14 | DBInitializer.InitializeDatabase(pickleContext); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Shared/Models/Review.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Review 10 | { 11 | public int Id { get; set; } 12 | public DateTime Date { get; set; } 13 | public string? UserId { get; set; } 14 | public string Text { get; set; } = string.Empty; 15 | public Product? Product { get; set; } 16 | public ICollection? Photos { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Api/Data/Extensions.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Api.Data; 2 | 3 | public static class Extensions 4 | { 5 | public static void CreateDbIfNotExists(this IHost host) 6 | { 7 | using var scope = host.Services.CreateScope(); 8 | 9 | var services = scope.ServiceProvider; 10 | var pickleContext = services.GetRequiredService(); 11 | 12 | pickleContext.Database.EnsureCreated(); 13 | 14 | DBInitializer.InitializeDatabase(pickleContext); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Shared/Models/Review.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Review 10 | { 11 | public int Id { get; set; } 12 | public DateTime Date { get; set; } 13 | public string? UserId { get; set; } 14 | public string Text { get; set; } = string.Empty; 15 | public Product? Product { get; set; } 16 | public ICollection? Photos { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Shared/LoginDisplay.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.Identity.Web 2 | @using Microsoft.Extensions.Options 3 | 4 | @inject IOptionsMonitor microsoftIdentityOptions 5 | 6 | 7 | 8 | Hello, @context.User.Identity?.Name! 9 | Log out 10 | 11 | 12 | Log in 13 | 14 | 15 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Api/Data/Extensions.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Api.Data; 2 | 3 | public static class Extensions 4 | { 5 | public static void CreateDbIfNotExists(this IHost host) 6 | { 7 | using var scope = host.Services.CreateScope(); 8 | 9 | var services = scope.ServiceProvider; 10 | var pickleContext = services.GetRequiredService(); 11 | 12 | pickleContext.Database.EnsureCreated(); 13 | 14 | DBInitializer.InitializeDatabase(pickleContext); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Shared/Models/Review.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Review 10 | { 11 | public int Id { get; set; } 12 | public DateTime Date { get; set; } 13 | public string? UserId { get; set; } 14 | public string Text { get; set; } = string.Empty; 15 | public Product? Product { get; set; } 16 | public ICollection? Photos { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Api/Data/Extensions.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Api.Data; 2 | 3 | public static class Extensions 4 | { 5 | public static void CreateDbIfNotExists(this IHost host) 6 | { 7 | using var scope = host.Services.CreateScope(); 8 | 9 | var services = scope.ServiceProvider; 10 | var pickleContext = services.GetRequiredService(); 11 | 12 | pickleContext.Database.EnsureCreated(); 13 | 14 | DBInitializer.InitializeDatabase(pickleContext); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Shared/Models/Review.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Review 10 | { 11 | public int Id { get; set; } 12 | public DateTime Date { get; set; } 13 | public string? UserId { get; set; } 14 | public string Text { get; set; } = string.Empty; 15 | public Product? Product { get; set; } 16 | public ICollection? Photos { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Data/Extensions.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Web.Data; 2 | 3 | public static class Extensions 4 | { 5 | public static void CreateDbIfNotExists(this IHost host) 6 | { 7 | using var scope = host.Services.CreateScope(); 8 | 9 | var services = scope.ServiceProvider; 10 | var pickleContext = services.GetRequiredService(); 11 | 12 | pickleContext.Database.EnsureCreated(); 13 | 14 | DBInitializer.InitializeDatabase(pickleContext); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Api/Data/Extensions.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Api.Data; 2 | 3 | public static class Extensions 4 | { 5 | public static void CreateDbIfNotExists(this IHost host) 6 | { 7 | using var scope = host.Services.CreateScope(); 8 | 9 | var services = scope.ServiceProvider; 10 | var pickleContext = services.GetRequiredService(); 11 | 12 | pickleContext.Database.EnsureCreated(); 13 | 14 | DBInitializer.InitializeDatabase(pickleContext); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Shared/Models/Review.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Review 10 | { 11 | public int Id { get; set; } 12 | public DateTime Date { get; set; } 13 | public string? UserId { get; set; } 14 | public string Text { get; set; } = string.Empty; 15 | public Product? Product { get; set; } 16 | public ICollection? Photos { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Shared/Models/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Product 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | public string? Description { get; set; } 14 | public string? PhotoUrl { get; set; } 15 | public ProductType? ProductType { get; set; } 16 | public ICollection? Reviews { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Shared/Models/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Product 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | public string? Description { get; set; } 14 | public string? PhotoUrl { get; set; } 15 | public ProductType? ProductType { get; set; } 16 | public ICollection? Reviews { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Data/Extensions.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Web.Data; 2 | 3 | public static class Extensions 4 | { 5 | public static void CreateDbIfNotExists(this IHost host) 6 | { 7 | using var scope = host.Services.CreateScope(); 8 | 9 | var services = scope.ServiceProvider; 10 | var pickleContext = services.GetRequiredService(); 11 | 12 | pickleContext.Database.EnsureCreated(); 13 | 14 | DBInitializer.InitializeDatabase(pickleContext); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Shared/Models/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Product 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | public string? Description { get; set; } 14 | public string? PhotoUrl { get; set; } 15 | public ProductType? ProductType { get; set; } 16 | public ICollection? Reviews { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Api/Data/Extensions.cs: -------------------------------------------------------------------------------- 1 | namespace MunsonPickles.Api.Data; 2 | 3 | public static class Extensions 4 | { 5 | public static void CreateDbIfNotExists(this IHost host) 6 | { 7 | using var scope = host.Services.CreateScope(); 8 | 9 | var services = scope.ServiceProvider; 10 | var pickleContext = services.GetRequiredService(); 11 | 12 | pickleContext.Database.EnsureCreated(); 13 | 14 | DBInitializer.InitializeDatabase(pickleContext); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Shared/Models/Review.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Review 10 | { 11 | public int Id { get; set; } 12 | public DateTime Date { get; set; } 13 | public string? UserId { get; set; } 14 | public string Text { get; set; } = string.Empty; 15 | public Product? Product { get; set; } 16 | public ICollection? Photos { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Shared/Models/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Product 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | public string? Description { get; set; } 14 | public string? PhotoUrl { get; set; } 15 | public ProductType? ProductType { get; set; } 16 | public ICollection? Reviews { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | Munson Pickles and Preserves 4 | 5 |
6 | 9 | 10 |
11 |
12 | 13 | About (identity) 14 |
15 | 16 |
17 | @Body 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | Munson Pickles and Preserves 4 | 5 |
6 | 9 | 10 |
11 |
12 | 13 | About (identity) 14 |
15 | 16 |
17 | @Body 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Shared/Models/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Product 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | public string? Description { get; set; } 14 | public string? PhotoUrl { get; set; } 15 | public ProductType? ProductType { get; set; } 16 | public ICollection? Reviews { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | Munson Pickles and Preserves 4 | 5 |
6 | 9 | 10 |
11 |
12 | 13 | About (identity) 14 |
15 | 16 |
17 | @Body 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Data/PickleDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Web.Models; 3 | 4 | namespace MunsonPickles.Web.Data; 5 | 6 | public class PickleDbContext : DbContext 7 | { 8 | public PickleDbContext(DbContextOptions options) : base(options) { } 9 | 10 | public DbSet Products => Set(); 11 | public DbSet ProductTypes => Set(); 12 | public DbSet Reviews => Set(); 13 | public DbSet ReviewsPhoto => Set(); 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | Munson Pickles and Preserves 4 | 5 |
6 | 9 | 10 |
11 |
12 | 13 | About (identity) 14 |
15 | 16 |
17 | @Body 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Shared/Models/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MunsonPickles.Shared.Models; 8 | 9 | public class Product 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } = string.Empty; 13 | public string? Description { get; set; } 14 | public string? PhotoUrl { get; set; } 15 | public ProductType? ProductType { get; set; } 16 | public ICollection? Reviews { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | Munson Pickles and Preserves 4 | 5 |
6 | 9 | 10 |
11 |
12 | 13 | About (identity) 14 |
15 | 16 |
17 | @Body 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/MunsonPickles.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | c743a913-08e5-4a36-aa09-921fabc6c6f1 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using MunsonPickles.Web 10 | @using MunsonPickles.Web.Shared 11 | @using MunsonPickles.Web.Services 12 | @using MunsonPickles.Shared.Models 13 | @using Microsoft.AspNetCore.Components.QuickGrid 14 | @using MunsonPickles.Web.Components 15 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using MunsonPickles.Web 10 | @using MunsonPickles.Web.Shared 11 | @using MunsonPickles.Web.Services 12 | @using MunsonPickles.Shared.Models 13 | @using Microsoft.AspNetCore.Components.QuickGrid 14 | @using MunsonPickles.Web.Components 15 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using MunsonPickles.Web 10 | @using MunsonPickles.Web.Shared 11 | @using MunsonPickles.Web.Services 12 | @using MunsonPickles.Shared.Models 13 | @using Microsoft.AspNetCore.Components.QuickGrid 14 | @using MunsonPickles.Web.Components 15 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using MunsonPickles.Web 10 | @using MunsonPickles.Web.Shared 11 | @using MunsonPickles.Web.Services 12 | @using MunsonPickles.Web.Models 13 | @using Microsoft.AspNetCore.Components.QuickGrid 14 | @using MunsonPickles.Web.Components 15 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using MunsonPickles.Web 10 | @using MunsonPickles.Web.Shared 11 | @using MunsonPickles.Web.Services 12 | @using MunsonPickles.Shared.Models 13 | @using Microsoft.AspNetCore.Components.QuickGrid 14 | @using MunsonPickles.Web.Components 15 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using MunsonPickles.Web 10 | @using MunsonPickles.Web.Shared 11 | @using MunsonPickles.Web.Services 12 | @using MunsonPickles.Web.Models 13 | @using Microsoft.AspNetCore.Components.QuickGrid 14 | @using MunsonPickles.Web.Components 15 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using MunsonPickles.Web 10 | @using MunsonPickles.Web.Shared 11 | @using MunsonPickles.Web.Services 12 | @using MunsonPickles.Shared.Models 13 | @using Microsoft.AspNetCore.Components.QuickGrid 14 | @using MunsonPickles.Web.Components 15 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Not found 9 | 10 |

Sorry, there's nothing at this address.

11 |
12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureAdB2C": { 3 | "Instance": "https://dotazure002.b2clogin.com/tfp/", 4 | "ClientId": "7d094931-dd9f-4813-ac97-14aeb9b2507d", 5 | "CallbackPath": "/signin-oidc", 6 | "Domain": "dotazure002.onmicrosoft.com", 7 | "SignedOutCallbackPath": "/signout/B2C_1_susi", 8 | "SignUpSignInPolicyId": "B2C_1_SignUpIn", 9 | "ResetPasswordPolicyId": "", 10 | "EditProfilePolicyId": "" 11 | }, 12 | "Logging": { 13 | "LogLevel": { 14 | "Default": "Information", 15 | "Microsoft.AspNetCore": "Warning" 16 | } 17 | }, 18 | "AllowedHosts": "*" 19 | } 20 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Not found 9 | 10 |

Sorry, there's nothing at this address.

11 |
12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using MunsonPickles.Web 10 | @using MunsonPickles.Web.Shared 11 | @using MunsonPickles.Web.Services 12 | @using MunsonPickles.Shared.Models 13 | @using Microsoft.AspNetCore.Components.QuickGrid 14 | @using MunsonPickles.Web.Components 15 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Not found 9 | 10 |

Sorry, there's nothing at this address.

11 |
12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Not found 9 | 10 |

Sorry, there's nothing at this address.

11 |
12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Not found 9 | 10 |

Sorry, there's nothing at this address.

11 |
12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using MunsonPickles.Shared.Models; 2 | 3 | namespace MunsonPickles.Web.Services; 4 | 5 | public class ProductService 6 | { 7 | private readonly HttpClient productHttp; 8 | 9 | public ProductService(HttpClient httpClient) 10 | { 11 | productHttp = httpClient; 12 | } 13 | 14 | public async Task> GetAllProducts() 15 | { 16 | return await productHttp.GetFromJsonAsync>("/products"); 17 | } 18 | 19 | public async Task? GetProductById(int productId) 20 | { 21 | return await productHttp.GetFromJsonAsync($"/products/{productId}"); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using MunsonPickles.Shared.Models; 2 | 3 | namespace MunsonPickles.Web.Services; 4 | 5 | public class ProductService 6 | { 7 | private readonly HttpClient productHttp; 8 | 9 | public ProductService(HttpClient httpClient) 10 | { 11 | productHttp = httpClient; 12 | } 13 | 14 | public async Task> GetAllProducts() 15 | { 16 | return await productHttp.GetFromJsonAsync>("/products"); 17 | } 18 | 19 | public async Task? GetProductById(int productId) 20 | { 21 | return await productHttp.GetFromJsonAsync($"/products/{productId}"); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using MunsonPickles.Shared.Models; 2 | 3 | namespace MunsonPickles.Web.Services; 4 | 5 | public class ProductService 6 | { 7 | private readonly HttpClient productHttp; 8 | 9 | public ProductService(HttpClient httpClient) 10 | { 11 | productHttp = httpClient; 12 | } 13 | 14 | public async Task> GetAllProducts() 15 | { 16 | return await productHttp.GetFromJsonAsync>("/products"); 17 | } 18 | 19 | public async Task? GetProductById(int productId) 20 | { 21 | return await productHttp.GetFromJsonAsync($"/products/{productId}"); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using MunsonPickles.Shared.Models; 2 | 3 | namespace MunsonPickles.Web.Services; 4 | 5 | public class ProductService 6 | { 7 | private readonly HttpClient productHttp; 8 | 9 | public ProductService(HttpClient httpClient) 10 | { 11 | productHttp = httpClient; 12 | } 13 | 14 | public async Task> GetAllProducts() 15 | { 16 | return await productHttp.GetFromJsonAsync>("/products"); 17 | } 18 | 19 | public async Task? GetProductById(int productId) 20 | { 21 | return await productHttp.GetFromJsonAsync($"/products/{productId}"); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using MunsonPickles.Shared.Models; 2 | 3 | namespace MunsonPickles.Web.Services; 4 | 5 | public class ProductService 6 | { 7 | private readonly HttpClient productHttp; 8 | 9 | public ProductService(HttpClient httpClient) 10 | { 11 | productHttp = httpClient; 12 | } 13 | 14 | public async Task> GetAllProducts() 15 | { 16 | return await productHttp.GetFromJsonAsync>("/products"); 17 | } 18 | 19 | public async Task? GetProductById(int productId) 20 | { 21 | return await productHttp.GetFromJsonAsync($"/products/{productId}"); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using MunsonPickles.Shared.Models; 2 | 3 | namespace MunsonPickles.Web.Services; 4 | 5 | public class ProductService 6 | { 7 | private readonly HttpClient productHttp; 8 | 9 | public ProductService(HttpClient httpClient) 10 | { 11 | productHttp = httpClient; 12 | } 13 | 14 | public async Task> GetAllProducts() 15 | { 16 | return await productHttp.GetFromJsonAsync>("/products"); 17 | } 18 | 19 | public async Task? GetProductById(int productId) 20 | { 21 | return await productHttp.GetFromJsonAsync($"/products/{productId}"); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Api/Data/PickleDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Shared.Models; 3 | 4 | namespace MunsonPickles.Api.Data; 5 | 6 | public class PickleDbContext : DbContext 7 | { 8 | public PickleDbContext(DbContextOptions options) : base(options) { } 9 | 10 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 11 | { 12 | optionsBuilder.LogTo(Console.WriteLine).EnableSensitiveDataLogging(); 13 | } 14 | 15 | public DbSet Products => Set(); 16 | public DbSet ProductTypes => Set(); 17 | public DbSet Reviews => Set(); 18 | public DbSet ReviewsPhoto => Set(); 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Api/Data/PickleDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Shared.Models; 3 | 4 | namespace MunsonPickles.Api.Data; 5 | 6 | public class PickleDbContext : DbContext 7 | { 8 | public PickleDbContext(DbContextOptions options) : base(options) { } 9 | 10 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 11 | { 12 | optionsBuilder.LogTo(Console.WriteLine).EnableSensitiveDataLogging(); 13 | } 14 | 15 | public DbSet Products => Set(); 16 | public DbSet ProductTypes => Set(); 17 | public DbSet Reviews => Set(); 18 | public DbSet ReviewsPhoto => Set(); 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Api/Data/PickleDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Shared.Models; 3 | 4 | namespace MunsonPickles.Api.Data; 5 | 6 | public class PickleDbContext : DbContext 7 | { 8 | public PickleDbContext(DbContextOptions options) : base(options) { } 9 | 10 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 11 | { 12 | optionsBuilder.LogTo(Console.WriteLine).EnableSensitiveDataLogging(); 13 | } 14 | 15 | public DbSet Products => Set(); 16 | public DbSet ProductTypes => Set(); 17 | public DbSet Reviews => Set(); 18 | public DbSet ReviewsPhoto => Set(); 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Data/PickleDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Web.Models; 3 | 4 | namespace MunsonPickles.Web.Data; 5 | 6 | public class PickleDbContext : DbContext 7 | { 8 | public PickleDbContext(DbContextOptions options) : base(options) { } 9 | 10 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 11 | { 12 | optionsBuilder.LogTo(Console.WriteLine).EnableSensitiveDataLogging(); 13 | } 14 | 15 | public DbSet Products => Set(); 16 | public DbSet ProductTypes => Set(); 17 | public DbSet Reviews => Set(); 18 | public DbSet ReviewsPhoto => Set(); 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/MunsonPickles.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | cf45aa0a-dca4-459d-9004-f17ce3fbe4e4 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Api/Data/PickleDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Shared.Models; 3 | 4 | namespace MunsonPickles.Api.Data; 5 | 6 | public class PickleDbContext : DbContext 7 | { 8 | public PickleDbContext(DbContextOptions options) : base(options) { } 9 | 10 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 11 | { 12 | optionsBuilder.LogTo(Console.WriteLine).EnableSensitiveDataLogging(); 13 | } 14 | 15 | public DbSet Products => Set(); 16 | public DbSet ProductTypes => Set(); 17 | public DbSet Reviews => Set(); 18 | public DbSet ReviewsPhoto => Set(); 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Api/Data/PickleDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Shared.Models; 3 | 4 | namespace MunsonPickles.Api.Data; 5 | 6 | public class PickleDbContext : DbContext 7 | { 8 | public PickleDbContext(DbContextOptions options) : base(options) { } 9 | 10 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 11 | { 12 | optionsBuilder.LogTo(Console.WriteLine).EnableSensitiveDataLogging(); 13 | } 14 | 15 | public DbSet Products => Set(); 16 | public DbSet ProductTypes => Set(); 17 | public DbSet Reviews => Set(); 18 | public DbSet ReviewsPhoto => Set(); 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Api/Data/PickleDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Shared.Models; 3 | 4 | namespace MunsonPickles.Api.Data; 5 | 6 | public class PickleDbContext : DbContext 7 | { 8 | public PickleDbContext(DbContextOptions options) : base(options) { } 9 | 10 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 11 | { 12 | optionsBuilder.LogTo(Console.WriteLine).EnableSensitiveDataLogging(); 13 | } 14 | 15 | public DbSet Products => Set(); 16 | public DbSet ProductTypes => Set(); 17 | public DbSet Reviews => Set(); 18 | public DbSet ReviewsPhoto => Set(); 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Api/MunsonPickles.Api.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | d6c3f055-e5ac-48fb-afa6-b7f94a4abc10 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Api/MunsonPickles.Api.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | d6c3f055-e5ac-48fb-afa6-b7f94a4abc10 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/MunsonPickles.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8d35ae23-2e40-44e6-ac8a-898461afa813 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Functions/MunsonPickles.Functions.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net6.0 4 | v4 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | PreserveNewest 13 | 14 | 15 | PreserveNewest 16 | Never 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace MunsonPickles.Web.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace MunsonPickles.Web.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace MunsonPickles.Web.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace MunsonPickles.Web.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace MunsonPickles.Web.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace MunsonPickles.Web.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace MunsonPickles.Web.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace MunsonPickles.Web.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureAdB2C": { 3 | "Instance": "https://dotazure002.b2clogin.com/tfp/", 4 | "ClientId": "7d094931-dd9f-4813-ac97-14aeb9b2507d", 5 | "CallbackPath": "/signin-oidc", 6 | "Domain": "dotazure002.onmicrosoft.com", 7 | "SignedOutCallbackPath": "/signout/B2C_1_susi", 8 | "SignUpSignInPolicyId": "B2C_1_SignUpIn", 9 | "ResetPasswordPolicyId": "", 10 | "ClientSecret": "9uR8Q~72lDUvX_WPwCx02WizCDNIZBOQtsZuLa5D", 11 | "EditProfilePolicyId": "" 12 | }, 13 | "ReviewApi": { 14 | "Scopes": "https://dotazure002.onmicrosoft.com/47542266-a8ac-415a-bfec-a73d5c1eb0ff/access_as_user" 15 | }, 16 | "Logging": { 17 | "LogLevel": { 18 | "Default": "Information", 19 | "Microsoft.AspNetCore": "Warning" 20 | } 21 | }, 22 | "AllowedHosts": "*" 23 | } 24 | 25 | 26 | //https://localhost:7075/signout-oidc -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Pages/ReviewDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/reviewdetails/{reviewId:int}" 2 | 3 | @inject ReviewService reviewService 4 | 5 | @if(review is null) 6 | { 7 |

Waiting for some reviews...

8 | } 9 | else 10 | { 11 |

@review?.Product?.Name Review

12 | 13 |
@review?.Text
14 | 15 | @if (review?.Photos is not null) 16 | { 17 | @foreach (var item in review.Photos) 18 | { 19 |
20 | 21 |
22 | } 23 | } 24 | } 25 | @code { 26 | [Parameter] 27 | public int ReviewId{ get; set; } 28 | 29 | Review? review; 30 | 31 | protected async override Task OnInitializedAsync() 32 | { 33 | review = await reviewService.GetReviewById(ReviewId); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Pages/ReviewDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/reviewdetails/{reviewId:int}" 2 | 3 | @inject ReviewService reviewService 4 | 5 | @if(review is null) 6 | { 7 |

Waiting for some reviews...

8 | } 9 | else 10 | { 11 |

@review?.Product?.Name Review

12 | 13 |
@review?.Text
14 | 15 | @if (review?.Photos is not null) 16 | { 17 | @foreach (var item in review.Photos) 18 | { 19 |
20 | 21 |
22 | } 23 | } 24 | } 25 | @code { 26 | [Parameter] 27 | public int ReviewId{ get; set; } 28 | 29 | Review? review; 30 | 31 | protected async override Task OnInitializedAsync() 32 | { 33 | review = await reviewService.GetReviewById(ReviewId); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Pages/ReviewDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/reviewdetails/{reviewId:int}" 2 | 3 | @inject ReviewService reviewService 4 | 5 | @if(review is null) 6 | { 7 |

Waiting for some reviews...

8 | } 9 | else 10 | { 11 |

@review?.Product?.Name Review

12 | 13 |
@review?.Text
14 | 15 | @if (review?.Photos is not null) 16 | { 17 | @foreach (var item in review.Photos) 18 | { 19 |
20 | 21 |
22 | } 23 | } 24 | } 25 | @code { 26 | [Parameter] 27 | public int ReviewId{ get; set; } 28 | 29 | Review? review; 30 | 31 | protected async override Task OnInitializedAsync() 32 | { 33 | review = await reviewService.GetReviewById(ReviewId); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Pages/ReviewDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/reviewdetails/{reviewId:int}" 2 | 3 | @inject ReviewService reviewService 4 | 5 | @if(review is null) 6 | { 7 |

Waiting for some reviews...

8 | } 9 | else 10 | { 11 |

@review?.Product?.Name Review

12 | 13 |
@review?.Text
14 | 15 | @if (review?.Photos is not null) 16 | { 17 | @foreach (var item in review.Photos) 18 | { 19 |
20 | 21 |
22 | } 23 | } 24 | } 25 | @code { 26 | [Parameter] 27 | public int ReviewId{ get; set; } 28 | 29 | Review? review; 30 | 31 | protected async override Task OnInitializedAsync() 32 | { 33 | review = await reviewService.GetReviewById(ReviewId); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Pages/ReviewDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/reviewdetails/{reviewId:int}" 2 | 3 | @inject ReviewService reviewService 4 | 5 | @if(review is null) 6 | { 7 |

Waiting for some reviews...

8 | } 9 | else 10 | { 11 |

@review?.Product?.Name Review

12 | 13 |
@review?.Text
14 | 15 | @if (review?.Photos is not null) 16 | { 17 | @foreach (var item in review.Photos) 18 | { 19 |
20 | 21 |
22 | } 23 | } 24 | } 25 | @code { 26 | [Parameter] 27 | public int ReviewId{ get; set; } 28 | 29 | Review? review; 30 | 31 | protected async override Task OnInitializedAsync() 32 | { 33 | review = await reviewService.GetReviewById(ReviewId); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Pages/ReviewDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/reviewdetails/{reviewId:int}" 2 | 3 | @inject ReviewService reviewService 4 | 5 | @if(review is null) 6 | { 7 |

Waiting for some reviews...

8 | } 9 | else 10 | { 11 |

@review?.Product?.Name Review

12 | 13 |
@review?.Text
14 | 15 | @if (review?.Photos is not null) 16 | { 17 | @foreach (var item in review.Photos) 18 | { 19 |
20 | 21 |
22 | } 23 | } 24 | } 25 | @code { 26 | [Parameter] 27 | public int ReviewId{ get; set; } 28 | 29 | Review? review; 30 | 31 | protected async override Task OnInitializedAsync() 32 | { 33 | review = await reviewService.GetReviewById(ReviewId); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Web.Data; 3 | using MunsonPickles.Web.Models; 4 | 5 | namespace MunsonPickles.Web.Services; 6 | 7 | public class ProductService 8 | { 9 | private readonly PickleDbContext productContext; 10 | 11 | public ProductService(PickleDbContext context) 12 | { 13 | productContext = context; 14 | } 15 | 16 | public async Task> GetAllProducts() 17 | { 18 | return await productContext 19 | .Products 20 | .Include(p => p.ProductType) 21 | .AsNoTracking() 22 | .ToListAsync(); 23 | } 24 | 25 | public async Task GetProductById(int productId) 26 | { 27 | return await productContext.Products.Where(p => p.Id == productId).AsNoTracking().FirstOrDefaultAsync(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Pages/ReviewDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/reviewdetails/{reviewId:int}" 2 | 3 | @inject ReviewService reviewService 4 | 5 | @if(review is null) 6 | { 7 |

Waiting for some reviews...

8 | } 9 | else 10 | { 11 |

@review?.Product?.Name Review

12 | 13 |
@review?.Text
14 | 15 | @if (review?.Photos is not null) 16 | { 17 | @foreach (var item in review.Photos) 18 | { 19 |
20 | 21 |
22 | } 23 | } 24 | } 25 | @code { 26 | [Parameter] 27 | public int ReviewId{ get; set; } 28 | 29 | Review? review; 30 | 31 | protected async override Task OnInitializedAsync() 32 | { 33 | review = await reviewService.GetReviewById(ReviewId); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Api/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Api.Data; 3 | using MunsonPickles.Shared.Models; 4 | 5 | namespace MunsonPickles.Api.Services; 6 | 7 | public class ProductService 8 | { 9 | private readonly PickleDbContext productContext; 10 | 11 | public ProductService(PickleDbContext context) 12 | { 13 | productContext = context; 14 | } 15 | 16 | public async Task> GetAllProducts() 17 | { 18 | return await productContext 19 | .Products 20 | .Include(p => p.ProductType) 21 | .AsNoTracking() 22 | .ToListAsync(); 23 | } 24 | 25 | public async Task? GetProductById(int productId) 26 | { 27 | return await productContext 28 | .Products 29 | .AsNoTracking() 30 | .FirstOrDefaultAsync(p => p.Id == productId); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Dockerfile: -------------------------------------------------------------------------------- 1 | #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. 2 | 3 | FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base 4 | WORKDIR /app 5 | EXPOSE 80 6 | EXPOSE 443 7 | 8 | FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build 9 | WORKDIR /src 10 | COPY ["MunsonPickles.Web/MunsonPickles.Web.csproj", "MunsonPickles.Web/"] 11 | COPY ["MunsonPickles.Shared/MunsonPickles.Shared.csproj", "MunsonPickles.Shared/"] 12 | RUN dotnet restore "MunsonPickles.Web/MunsonPickles.Web.csproj" 13 | COPY . . 14 | WORKDIR "/src/MunsonPickles.Web" 15 | RUN dotnet build "MunsonPickles.Web.csproj" -c Release -o /app/build 16 | 17 | FROM build AS publish 18 | RUN dotnet publish "MunsonPickles.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false 19 | 20 | FROM base AS final 21 | WORKDIR /app 22 | COPY --from=publish /app/publish . 23 | ENTRYPOINT ["dotnet", "MunsonPickles.Web.dll"] -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Api/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Api.Data; 3 | using MunsonPickles.Shared.Models; 4 | 5 | namespace MunsonPickles.Api.Services; 6 | 7 | public class ProductService 8 | { 9 | private readonly PickleDbContext productContext; 10 | 11 | public ProductService(PickleDbContext context) 12 | { 13 | productContext = context; 14 | } 15 | 16 | public async Task> GetAllProducts() 17 | { 18 | return await productContext 19 | .Products 20 | .Include(p => p.ProductType) 21 | .AsNoTracking() 22 | .ToListAsync(); 23 | } 24 | 25 | public async Task? GetProductById(int productId) 26 | { 27 | return await productContext 28 | .Products 29 | .AsNoTracking() 30 | .FirstOrDefaultAsync(p => p.Id == productId); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Dockerfile: -------------------------------------------------------------------------------- 1 | #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. 2 | 3 | FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base 4 | WORKDIR /app 5 | EXPOSE 80 6 | EXPOSE 443 7 | 8 | FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build 9 | WORKDIR /src 10 | COPY ["MunsonPickles.Web/MunsonPickles.Web.csproj", "MunsonPickles.Web/"] 11 | COPY ["MunsonPickles.Shared/MunsonPickles.Shared.csproj", "MunsonPickles.Shared/"] 12 | RUN dotnet restore "MunsonPickles.Web/MunsonPickles.Web.csproj" 13 | COPY . . 14 | WORKDIR "/src/MunsonPickles.Web" 15 | RUN dotnet build "MunsonPickles.Web.csproj" -c Release -o /app/build 16 | 17 | FROM build AS publish 18 | RUN dotnet publish "MunsonPickles.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false 19 | 20 | FROM base AS final 21 | WORKDIR /app 22 | COPY --from=publish /app/publish . 23 | ENTRYPOINT ["dotnet", "MunsonPickles.Web.dll"] -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Api/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Api.Data; 3 | using MunsonPickles.Shared.Models; 4 | 5 | namespace MunsonPickles.Api.Services; 6 | 7 | public class ProductService 8 | { 9 | private readonly PickleDbContext productContext; 10 | 11 | public ProductService(PickleDbContext context) 12 | { 13 | productContext = context; 14 | } 15 | 16 | public async Task> GetAllProducts() 17 | { 18 | return await productContext 19 | .Products 20 | .Include(p => p.ProductType) 21 | .AsNoTracking() 22 | .ToListAsync(); 23 | } 24 | 25 | public async Task? GetProductById(int productId) 26 | { 27 | return await productContext 28 | .Products 29 | .AsNoTracking() 30 | .FirstOrDefaultAsync(p => p.Id == productId); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Api/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Api.Data; 3 | using MunsonPickles.Shared.Models; 4 | 5 | namespace MunsonPickles.Api.Services; 6 | 7 | public class ProductService 8 | { 9 | private readonly PickleDbContext productContext; 10 | 11 | public ProductService(PickleDbContext context) 12 | { 13 | productContext = context; 14 | } 15 | 16 | public async Task> GetAllProducts() 17 | { 18 | return await productContext 19 | .Products 20 | .Include(p => p.ProductType) 21 | .AsNoTracking() 22 | .ToListAsync(); 23 | } 24 | 25 | public async Task? GetProductById(int productId) 26 | { 27 | return await productContext 28 | .Products 29 | .AsNoTracking() 30 | .FirstOrDefaultAsync(p => p.Id == productId); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Api/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Api.Data; 3 | using MunsonPickles.Shared.Models; 4 | 5 | namespace MunsonPickles.Api.Services; 6 | 7 | public class ProductService 8 | { 9 | private readonly PickleDbContext productContext; 10 | 11 | public ProductService(PickleDbContext context) 12 | { 13 | productContext = context; 14 | } 15 | 16 | public async Task> GetAllProducts() 17 | { 18 | return await productContext 19 | .Products 20 | .Include(p => p.ProductType) 21 | .AsNoTracking() 22 | .ToListAsync(); 23 | } 24 | 25 | public async Task? GetProductById(int productId) 26 | { 27 | return await productContext 28 | .Products 29 | .AsNoTracking() 30 | .FirstOrDefaultAsync(p => p.Id == productId); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Web.Data; 3 | using MunsonPickles.Web.Models; 4 | 5 | namespace MunsonPickles.Web.Services; 6 | 7 | public class ProductService 8 | { 9 | private readonly PickleDbContext productContext; 10 | 11 | public ProductService(PickleDbContext context) 12 | { 13 | productContext = context; 14 | } 15 | 16 | public async Task> GetAllProducts() 17 | { 18 | return await productContext 19 | .Products 20 | .Include(p => p.ProductType) 21 | .AsNoTracking() 22 | .ToListAsync(); 23 | } 24 | 25 | public async Task? GetProductById(int productId) 26 | { 27 | return await productContext 28 | .Products 29 | .AsNoTracking() 30 | .FirstOrDefaultAsync(p => p.Id == productId); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Api/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using MunsonPickles.Api.Data; 3 | using MunsonPickles.Shared.Models; 4 | 5 | namespace MunsonPickles.Api.Services; 6 | 7 | public class ProductService 8 | { 9 | private readonly PickleDbContext productContext; 10 | 11 | public ProductService(PickleDbContext context) 12 | { 13 | productContext = context; 14 | } 15 | 16 | public async Task> GetAllProducts() 17 | { 18 | return await productContext 19 | .Products 20 | .Include(p => p.ProductType) 21 | .AsNoTracking() 22 | .ToListAsync(); 23 | } 24 | 25 | public async Task? GetProductById(int productId) 26 | { 27 | return await productContext 28 | .Products 29 | .AsNoTracking() 30 | .FirstOrDefaultAsync(p => p.Id == productId); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Api/Dockerfile: -------------------------------------------------------------------------------- 1 | #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. 2 | 3 | FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base 4 | WORKDIR /app 5 | EXPOSE 80 6 | EXPOSE 443 7 | 8 | FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build 9 | WORKDIR /src 10 | COPY ["MunsonPickles.Api/MunsonPickles.Api.csproj", "MunsonPickles.Api/"] 11 | COPY ["MunsonPickles.Shared/MunsonPickles.Shared.csproj", "MunsonPickles.Shared/"] 12 | RUN dotnet restore "MunsonPickles.Api/MunsonPickles.Api.csproj" 13 | COPY . . 14 | WORKDIR "/src/MunsonPickles.Api" 15 | RUN dotnet build "MunsonPickles.Api.csproj" -c Release -o /app/build 16 | 17 | FROM build AS publish 18 | RUN dotnet publish "MunsonPickles.Api.csproj" -c Release -o /app/publish /p:UseAppHost=false 19 | 20 | FROM base AS final 21 | WORKDIR /app 22 | COPY --from=publish /app/publish . 23 | ENTRYPOINT ["dotnet", "MunsonPickles.Api.dll"] -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Api/Dockerfile: -------------------------------------------------------------------------------- 1 | #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. 2 | 3 | FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base 4 | WORKDIR /app 5 | EXPOSE 80 6 | EXPOSE 443 7 | 8 | FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build 9 | WORKDIR /src 10 | COPY ["MunsonPickles.Api/MunsonPickles.Api.csproj", "MunsonPickles.Api/"] 11 | COPY ["MunsonPickles.Shared/MunsonPickles.Shared.csproj", "MunsonPickles.Shared/"] 12 | RUN dotnet restore "MunsonPickles.Api/MunsonPickles.Api.csproj" 13 | COPY . . 14 | WORKDIR "/src/MunsonPickles.Api" 15 | RUN dotnet build "MunsonPickles.Api.csproj" -c Release -o /app/build 16 | 17 | FROM build AS publish 18 | RUN dotnet publish "MunsonPickles.Api.csproj" -c Release -o /app/publish /p:UseAppHost=false 19 | 20 | FROM base AS final 21 | WORKDIR /app 22 | COPY --from=publish /app/publish . 23 | ENTRYPOINT ["dotnet", "MunsonPickles.Api.dll"] -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 9 | 10 | 19 | 20 | @code { 21 | private bool collapseNavMenu = true; 22 | 23 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; 24 | 25 | private void ToggleNavMenu() 26 | { 27 | collapseNavMenu = !collapseNavMenu; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 9 | 10 | 19 | 20 | @code { 21 | private bool collapseNavMenu = true; 22 | 23 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; 24 | 25 | private void ToggleNavMenu() 26 | { 27 | collapseNavMenu = !collapseNavMenu; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 9 | 10 | 19 | 20 | @code { 21 | private bool collapseNavMenu = true; 22 | 23 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; 24 | 25 | private void ToggleNavMenu() 26 | { 27 | collapseNavMenu = !collapseNavMenu; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 9 | 10 | 19 | 20 | @code { 21 | private bool collapseNavMenu = true; 22 | 23 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; 24 | 25 | private void ToggleNavMenu() 26 | { 27 | collapseNavMenu = !collapseNavMenu; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 9 | 10 | 19 | 20 | @code { 21 | private bool collapseNavMenu = true; 22 | 23 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; 24 | 25 | private void ToggleNavMenu() 26 | { 27 | collapseNavMenu = !collapseNavMenu; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 9 | 10 | 19 | 20 | @code { 21 | private bool collapseNavMenu = true; 22 | 23 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; 24 | 25 | private void ToggleNavMenu() 26 | { 27 | collapseNavMenu = !collapseNavMenu; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 9 | 10 | 19 | 20 | @code { 21 | private bool collapseNavMenu = true; 22 | 23 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; 24 | 25 | private void ToggleNavMenu() 26 | { 27 | collapseNavMenu = !collapseNavMenu; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 9 | 10 | 19 | 20 | @code { 21 | private bool collapseNavMenu = true; 22 | 23 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; 24 | 25 | private void ToggleNavMenu() 26 | { 27 | collapseNavMenu = !collapseNavMenu; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Components/ProductReviews.razor: -------------------------------------------------------------------------------- 1 | @inject ReviewService reviewService 2 | 3 |

Reviews

4 | 5 | @if (Product is null || Reviews is null) 6 | { 7 |

We're still waiting for some reviews...

8 | } 9 | else 10 | { 11 |
12 | 13 | 14 | 15 |
16 |
17 | 18 |
19 | } 20 | 21 | @code { 22 | [Parameter] 23 | public Product? Product { get; set; } 24 | 25 | public IQueryable? Reviews; 26 | 27 | protected override async Task OnInitializedAsync() 28 | { 29 | if (Product is null) 30 | return; 31 | 32 | await GetReviews(); 33 | } 34 | 35 | async Task GetReviews() 36 | { 37 | Reviews = (await reviewService.GetReviewsForProduct(Product.Id)).AsQueryable(); 38 | } 39 | } -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Api/MunsonPickles.Api.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | d6c3f055-e5ac-48fb-afa6-b7f94a4abc10 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Services/ReviewService.cs: -------------------------------------------------------------------------------- 1 | using MunsonPickles.Shared.Models; 2 | using MunsonPickles.Shared.Transfer; 3 | 4 | namespace MunsonPickles.Web.Services; 5 | 6 | public class ReviewService 7 | { 8 | private readonly HttpClient reviewClient; 9 | 10 | public ReviewService(HttpClient client) 11 | { 12 | reviewClient = client; 13 | } 14 | 15 | public async Task AddReview(string reviewText, List photoUrls, int productId) 16 | { 17 | NewReview newReview = new NewReview { 18 | PhotoUrls = photoUrls, 19 | ProductId = productId, 20 | ReviewText = reviewText 21 | }; 22 | 23 | await reviewClient.PostAsJsonAsync("/reviews", newReview); 24 | } 25 | 26 | public async Task> GetReviewsForProduct(int productId) 27 | { 28 | return await reviewClient.GetFromJsonAsync>($"/products/{productId}/reviews"); 29 | } 30 | 31 | public async Task? GetReviewById(int reviewId) 32 | { 33 | return await reviewClient.GetFromJsonAsync($"/reviews/{reviewId}"); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Services/ReviewService.cs: -------------------------------------------------------------------------------- 1 | using MunsonPickles.Shared.Models; 2 | using MunsonPickles.Shared.Transfer; 3 | 4 | namespace MunsonPickles.Web.Services; 5 | 6 | public class ReviewService 7 | { 8 | private readonly HttpClient reviewClient; 9 | 10 | public ReviewService(HttpClient client) 11 | { 12 | reviewClient = client; 13 | } 14 | 15 | public async Task AddReview(string reviewText, List photoUrls, int productId) 16 | { 17 | NewReview newReview = new NewReview { 18 | PhotoUrls = photoUrls, 19 | ProductId = productId, 20 | ReviewText = reviewText 21 | }; 22 | 23 | await reviewClient.PostAsJsonAsync("/reviews", newReview); 24 | } 25 | 26 | public async Task> GetReviewsForProduct(int productId) 27 | { 28 | return await reviewClient.GetFromJsonAsync>($"/products/{productId}/reviews"); 29 | } 30 | 31 | public async Task? GetReviewById(int reviewId) 32 | { 33 | return await reviewClient.GetFromJsonAsync($"/reviews/{reviewId}"); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:28283", 7 | "sslPort": 44336 8 | } 9 | }, 10 | "profiles": { 11 | "http": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "applicationUrl": "http://localhost:5298", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "https": { 21 | "commandName": "Project", 22 | "dotnetRunMessages": true, 23 | "launchBrowser": true, 24 | "applicationUrl": "https://localhost:7075;http://localhost:5298", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | }, 29 | "IIS Express": { 30 | "commandName": "IISExpress", 31 | "launchBrowser": true, 32 | "environmentVariables": { 33 | "ASPNETCORE_ENVIRONMENT": "Development" 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Matt Soucoup 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. 22 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:28283", 7 | "sslPort": 44336 8 | } 9 | }, 10 | "profiles": { 11 | "http": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "applicationUrl": "http://localhost:5298", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "https": { 21 | "commandName": "Project", 22 | "dotnetRunMessages": true, 23 | "launchBrowser": true, 24 | "applicationUrl": "https://localhost:7075;http://localhost:5298", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | }, 29 | "IIS Express": { 30 | "commandName": "IISExpress", 31 | "launchBrowser": true, 32 | "environmentVariables": { 33 | "ASPNETCORE_ENVIRONMENT": "Development" 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:28283", 7 | "sslPort": 44336 8 | } 9 | }, 10 | "profiles": { 11 | "http": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "applicationUrl": "http://localhost:5298", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "https": { 21 | "commandName": "Project", 22 | "dotnetRunMessages": true, 23 | "launchBrowser": true, 24 | "applicationUrl": "https://localhost:7075;http://localhost:5298", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | }, 29 | "IIS Express": { 30 | "commandName": "IISExpress", 31 | "launchBrowser": true, 32 | "environmentVariables": { 33 | "ASPNETCORE_ENVIRONMENT": "Development" 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:28283", 7 | "sslPort": 44336 8 | } 9 | }, 10 | "profiles": { 11 | "http": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "applicationUrl": "http://localhost:5298", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "https": { 21 | "commandName": "Project", 22 | "dotnetRunMessages": true, 23 | "launchBrowser": true, 24 | "applicationUrl": "https://localhost:7075;http://localhost:5298", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | }, 29 | "IIS Express": { 30 | "commandName": "IISExpress", 31 | "launchBrowser": true, 32 | "environmentVariables": { 33 | "ASPNETCORE_ENVIRONMENT": "Development" 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:28283", 7 | "sslPort": 44336 8 | } 9 | }, 10 | "profiles": { 11 | "http": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "applicationUrl": "http://localhost:5298", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "https": { 21 | "commandName": "Project", 22 | "dotnetRunMessages": true, 23 | "launchBrowser": true, 24 | "applicationUrl": "https://localhost:7075;http://localhost:5298", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | }, 29 | "IIS Express": { 30 | "commandName": "IISExpress", 31 | "launchBrowser": true, 32 | "environmentVariables": { 33 | "ASPNETCORE_ENVIRONMENT": "Development" 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:28283", 7 | "sslPort": 44336 8 | } 9 | }, 10 | "profiles": { 11 | "http": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "applicationUrl": "http://localhost:5298", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "https": { 21 | "commandName": "Project", 22 | "dotnetRunMessages": true, 23 | "launchBrowser": true, 24 | "applicationUrl": "https://localhost:7075;http://localhost:5298", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | }, 29 | "IIS Express": { 30 | "commandName": "IISExpress", 31 | "launchBrowser": true, 32 | "environmentVariables": { 33 | "ASPNETCORE_ENVIRONMENT": "Development" 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Api/MunsonPickles.Api.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | d6c3f055-e5ac-48fb-afa6-b7f94a4abc10 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 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 13 | all 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 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 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 13 | all 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 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/MunsonPickles.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8d35ae23-2e40-44e6-ac8a-898461afa813 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 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 13 | all 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 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureAdB2C": { 3 | "Instance": "https://dotazure002.b2clogin.com/tfp/", 4 | "ClientId": "7d094931-dd9f-4813-ac97-14aeb9b2507d", 5 | "CallbackPath": "/signin-oidc", 6 | "Domain": "dotazure002.onmicrosoft.com", 7 | "SignedOutCallbackPath": "/signout/B2C_1_susi", 8 | "SignUpSignInPolicyId": "B2C_1_SignUpIn", 9 | "ResetPasswordPolicyId": "", 10 | "ClientSecret": "9uR8Q~72lDUvX_WPwCx02WizCDNIZBOQtsZuLa5D", 11 | "EditProfilePolicyId": "" 12 | }, 13 | "ReviewApi": { 14 | "Scopes": "https://dotazure002.onmicrosoft.com/47542266-a8ac-415a-bfec-a73d5c1eb0ff/access_as_user" 15 | }, 16 | "Cdn": { 17 | "Endpoint": "https://cdne-dotazure-002.azureedge.net" 18 | }, 19 | "Api": { 20 | "ReviewEndpoint": "https://localhost:7169", 21 | "ProductEndpoint": "https://localhost:7169" 22 | }, 23 | "Storage": { 24 | "Endpoint": "https://stdotazureeastus002.blob.core.windows.net" 25 | }, 26 | "Logging": { 27 | "LogLevel": { 28 | "Default": "Information", 29 | "Microsoft.AspNetCore": "Warning" 30 | } 31 | }, 32 | "AllowedHosts": "*" 33 | } 34 | 35 | 36 | //https://localhost:7075/signout-oidc -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Components/ProductReviews.razor: -------------------------------------------------------------------------------- 1 | @inject ReviewService reviewService 2 | 3 |

Reviews

4 | 5 | @if (Product is null || Reviews is null) 6 | { 7 |

We're still waiting for some reviews...

8 | } 9 | else 10 | { 11 |
12 | 13 | @**@ 14 | 15 | @context.Text 16 | 17 | 18 |
19 |
20 | 21 |
22 | } 23 | 24 | @code { 25 | [Parameter] 26 | public Product? Product { get; set; } 27 | 28 | public IQueryable? Reviews; 29 | 30 | protected override async Task OnInitializedAsync() 31 | { 32 | if (Product is null) 33 | return; 34 | 35 | await GetReviews(); 36 | } 37 | 38 | async Task GetReviews() 39 | { 40 | Reviews = (await reviewService.GetReviewsForProduct(Product.Id)).AsQueryable(); 41 | } 42 | } -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 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 13 | all 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 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureAdB2C": { 3 | "Instance": "https://dotazure002.b2clogin.com/tfp/", 4 | "ClientId": "7d094931-dd9f-4813-ac97-14aeb9b2507d", 5 | "CallbackPath": "/signin-oidc", 6 | "Domain": "dotazure002.onmicrosoft.com", 7 | "SignedOutCallbackPath": "/signout/B2C_1_susi", 8 | "SignUpSignInPolicyId": "B2C_1_SignUpIn", 9 | "ResetPasswordPolicyId": "", 10 | "ClientSecret": "9uR8Q~72lDUvX_WPwCx02WizCDNIZBOQtsZuLa5D", 11 | "EditProfilePolicyId": "" 12 | }, 13 | "ReviewApi": { 14 | "Scopes": "https://dotazure002.onmicrosoft.com/47542266-a8ac-415a-bfec-a73d5c1eb0ff/access_as_user" 15 | }, 16 | "Cdn": { 17 | "Endpoint": "https://cdne-dotazure-002.azureedge.net" 18 | }, 19 | "Api": { 20 | "ReviewEndpoint": "https://localhost:7169", 21 | "ProductEndpoint": "https://localhost:7169" 22 | }, 23 | "Storage": { 24 | "Endpoint": "https://stdotazureeastus002.blob.core.windows.net" 25 | }, 26 | "Logging": { 27 | "LogLevel": { 28 | "Default": "Information", 29 | "Microsoft.AspNetCore": "Warning" 30 | } 31 | }, 32 | "AllowedHosts": "*" 33 | } 34 | 35 | 36 | //https://localhost:7075/signout-oidc -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Components/ProductReviews.razor: -------------------------------------------------------------------------------- 1 | @inject ReviewService reviewService 2 | 3 |

Reviews

4 | 5 | @if (Product is null || Reviews is null) 6 | { 7 |

We're still waiting for some reviews...

8 | } 9 | else 10 | { 11 |
12 | 13 | @**@ 14 | 15 | @context.Text 16 | 17 | 18 |
19 |
20 | 21 |
22 | } 23 | 24 | @code { 25 | [Parameter] 26 | public Product? Product { get; set; } 27 | 28 | public IQueryable? Reviews; 29 | 30 | protected override async Task OnInitializedAsync() 31 | { 32 | if (Product is null) 33 | return; 34 | 35 | await GetReviews(); 36 | } 37 | 38 | async Task GetReviews() 39 | { 40 | Reviews = (await reviewService.GetReviewsForProduct(Product.Id)).AsQueryable(); 41 | } 42 | } -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 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 13 | all 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 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 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 13 | all 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 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/MunsonPickles.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8d35ae23-2e40-44e6-ac8a-898461afa813 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Components/ProductReviews.razor: -------------------------------------------------------------------------------- 1 | @inject ReviewService reviewService 2 | 3 |

Reviews

4 | 5 | @if (Product is null || Reviews is null) 6 | { 7 |

We're still waiting for some reviews...

8 | } 9 | else 10 | { 11 |
12 | 13 | @**@ 14 | 15 | @context.Text 16 | 17 | 18 |
19 |
20 | 21 |
22 | } 23 | 24 | @code { 25 | [Parameter] 26 | public Product? Product { get; set; } 27 | 28 | public IQueryable? Reviews; 29 | 30 | protected override async Task OnInitializedAsync() 31 | { 32 | if (Product is null) 33 | return; 34 | 35 | await GetReviews(); 36 | } 37 | 38 | async Task GetReviews() 39 | { 40 | Reviews = (await reviewService.GetReviewsForProduct(Product.Id)).AsQueryable(); 41 | } 42 | } -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 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 13 | all 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 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Components/ProductReviews.razor: -------------------------------------------------------------------------------- 1 | @inject ReviewService reviewService 2 | 3 |

Reviews

4 | 5 | @if (Product is null || Reviews is null) 6 | { 7 |

We're still waiting for some reviews...

8 | } 9 | else 10 | { 11 |
12 | 13 | @**@ 14 | 15 | @context.Text 16 | 17 | 18 |
19 |
20 | 21 |
22 | } 23 | 24 | @code { 25 | [Parameter] 26 | public Product? Product { get; set; } 27 | 28 | public IQueryable? Reviews; 29 | 30 | protected override async Task OnInitializedAsync() 31 | { 32 | if (Product is null) 33 | return; 34 | 35 | await GetReviews(); 36 | } 37 | 38 | async Task GetReviews() 39 | { 40 | Reviews = (await reviewService.GetReviewsForProduct(Product.Id)).AsQueryable(); 41 | } 42 | } -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Components/ProductReviews.razor: -------------------------------------------------------------------------------- 1 | @inject ReviewService reviewService 2 | 3 |

Reviews

4 | 5 | @if (Product is null || Reviews is null) 6 | { 7 |

We're still waiting for some reviews...

8 | } 9 | else 10 | { 11 |
12 | 13 | @**@ 14 | 15 | @context.Text 16 | 17 | 18 |
19 |
20 | 21 |
22 | } 23 | 24 | @code { 25 | [Parameter] 26 | public Product? Product { get; set; } 27 | 28 | public IQueryable? Reviews; 29 | 30 | protected override async Task OnInitializedAsync() 31 | { 32 | if (Product is null) 33 | return; 34 | 35 | await GetReviews(); 36 | } 37 | 38 | async Task GetReviews() 39 | { 40 | Reviews = (await reviewService.GetReviewsForProduct(Product.Id)).AsQueryable(); 41 | } 42 | } -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Components/ProductReviews.razor: -------------------------------------------------------------------------------- 1 | @inject ReviewService reviewService 2 | 3 |

Reviews

4 | 5 | @if (Product is null || Reviews is null) 6 | { 7 |

We're still waiting for some reviews...

8 | } 9 | else 10 | { 11 |
12 | 13 | @**@ 14 | 15 | @context.Text 16 | 17 | 18 |
19 |
20 | 21 |
22 | } 23 | 24 | @code { 25 | [Parameter] 26 | public Product? Product { get; set; } 27 | 28 | public IQueryable? Reviews; 29 | 30 | protected override async Task OnInitializedAsync() 31 | { 32 | if (Product is null) 33 | return; 34 | 35 | await GetReviews(); 36 | } 37 | 38 | async Task GetReviews() 39 | { 40 | Reviews = (await reviewService.GetReviewsForProduct(Product.Id)).AsQueryable(); 41 | } 42 | } -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 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 13 | all 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 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Components/ProductReviews.razor: -------------------------------------------------------------------------------- 1 | @inject ReviewService reviewService 2 | 3 |

Reviews

4 | 5 | @if (Product is null || Reviews is null) 6 | { 7 |

We're still waiting for some reviews...

8 | } 9 | else 10 | { 11 |
12 | 13 | @**@ 14 | 15 | @context.Text 16 | 17 | 18 |
19 |
20 | 21 |
22 | } 23 | 24 | @code { 25 | [Parameter] 26 | public Product? Product { get; set; } 27 | 28 | public IQueryable? Reviews; 29 | 30 | protected override async Task OnInitializedAsync() 31 | { 32 | if (Product is null) 33 | return; 34 | 35 | await GetReviews(); 36 | } 37 | 38 | async Task GetReviews() 39 | { 40 | Reviews = (await reviewService.GetReviewsForProduct(Product.Id)).AsQueryable(); 41 | } 42 | } -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.5.33103.201 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MunsonPickles.Web", "MunsonPickles.Web\MunsonPickles.Web.csproj", "{A12EB21A-BF3C-49F0-9263-9F9C4607A539}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {A12EB21A-BF3C-49F0-9263-9F9C4607A539}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {A12EB21A-BF3C-49F0-9263-9F9C4607A539}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {A12EB21A-BF3C-49F0-9263-9F9C4607A539}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {A12EB21A-BF3C-49F0-9263-9F9C4607A539}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {5E28577A-2713-407B-9FB6-3A1740ABFB64} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.5.33103.201 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MunsonPickles.Web", "MunsonPickles.Web\MunsonPickles.Web.csproj", "{A12EB21A-BF3C-49F0-9263-9F9C4607A539}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {A12EB21A-BF3C-49F0-9263-9F9C4607A539}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {A12EB21A-BF3C-49F0-9263-9F9C4607A539}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {A12EB21A-BF3C-49F0-9263-9F9C4607A539}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {A12EB21A-BF3C-49F0-9263-9F9C4607A539}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {5E28577A-2713-407B-9FB6-3A1740ABFB64} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/MunsonPickles.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | b6412a9f-8427-4da8-b28a-f6b47a60c0a3 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /7-functions/MunsonPickleFunctions.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.4.33213.308 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MunsonPickles.Functions", "MunsonPickles.Functions\MunsonPickles.Functions.csproj", "{76D999D6-FFE8-4629-AB1B-A0E7F8FECB73}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {76D999D6-FFE8-4629-AB1B-A0E7F8FECB73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {76D999D6-FFE8-4629-AB1B-A0E7F8FECB73}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {76D999D6-FFE8-4629-AB1B-A0E7F8FECB73}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {76D999D6-FFE8-4629-AB1B-A0E7F8FECB73}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {1CF386A5-E130-4D08-AE4C-E06053AB81EA} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using Microsoft.AspNetCore.Components.Web; 3 | using MunsonPickles.Web.Data; 4 | using MunsonPickles.Web.Services; 5 | 6 | var builder = WebApplication.CreateBuilder(args); 7 | 8 | // Add services to the container. 9 | builder.Services.AddRazorPages(); 10 | builder.Services.AddServerSideBlazor(); 11 | 12 | var sqlConnection = builder.Configuration["ConnectionStrings:SqlDb:DotAzure"]; 13 | 14 | builder.Services.AddSqlServer(sqlConnection, options => options.EnableRetryOnFailure()); 15 | 16 | builder.Services.AddTransient(); 17 | builder.Services.AddTransient(); 18 | 19 | var app = builder.Build(); 20 | 21 | // Configure the HTTP request pipeline. 22 | if (!app.Environment.IsDevelopment()) 23 | { 24 | app.UseExceptionHandler("/Error"); 25 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 26 | app.UseHsts(); 27 | } 28 | 29 | app.UseHttpsRedirection(); 30 | 31 | app.UseStaticFiles(); 32 | 33 | app.UseRouting(); 34 | 35 | app.MapBlazorHub(); 36 | app.MapFallbackToPage("/_Host"); 37 | 38 | app.CreateDbIfNotExists(); 39 | 40 | app.Run(); 41 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Pages/ProductDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/productdetails/{productId:int}" 2 | 3 | @inject ProductService productService 4 | 5 | @if(product is null) 6 | { 7 |

Still loading...

8 | } 9 | else 10 | { 11 |

@product?.Name

12 | 13 |
14 |
15 |
16 |

@product?.Description

17 |
18 |
19 |
20 |
21 | 22 |
23 |
24 |
25 |
26 | 27 |
28 |
29 |
30 | 31 | 32 | } 33 | 34 | 35 | @code { 36 | [Parameter] 37 | public int ProductId { get; set; } 38 | 39 | Product? product; 40 | 41 | protected override async Task OnInitializedAsync() 42 | { 43 | product = await productService.GetProductById(ProductId); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Api/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:48897", 8 | "sslPort": 44374 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "http://localhost:5181", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "launchUrl": "swagger", 27 | "applicationUrl": "https://localhost:7169;http://localhost:5181", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "launchUrl": "swagger", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureAdB2C": { 3 | "Instance": "https://munsonpickles.b2clogin.com/tfp/", 4 | "ClientId": "72c59063-e596-47e0-ac83-289ae86926ca", 5 | "CallbackPath": "/signin-oidc", 6 | "Domain": "munsonpickles.onmicrosoft.com", 7 | "SignedOutCallbackPath": "/signout/B2C_1_susi", 8 | "SignUpSignInPolicyId": "B2C_1_SignUpIn", 9 | "ResetPasswordPolicyId": "B2C_1_PasswordReset", 10 | "ClientSecret": "tdl8Q~yULiW5DHS6CkU2TN0Xlo14YEYAqC~fyaxj", 11 | "EditProfilePolicyId": "" 12 | }, 13 | "ReviewApi": { 14 | "Scopes": "https://munsonpickles.onmicrosoft.com/f7c13dc3-a07d-4951-9f6c-a941befaf415/access_as_user" 15 | }, 16 | "Cdn": { 17 | "Endpoint": "https://cdne-munson-dev-001.azureedge.net" 18 | }, 19 | "Api": { 20 | "ReviewEndpoint": "https://localhost:7169", 21 | "ProductEndpoint": "https://localhost:7169" 22 | }, 23 | "Storage": { 24 | "Endpoint": "https://stmunsoneastusdev002.blob.core.windows.net", 25 | "QueueEndpoint": "https://stmunsoneastusdev002.queue.core.windows.net", 26 | }, 27 | "Logging": { 28 | "LogLevel": { 29 | "Default": "Information", 30 | "Microsoft.AspNetCore": "Warning" 31 | } 32 | }, 33 | "AllowedHosts": "*" 34 | } 35 | 36 | 37 | //https://localhost:7075/signout-oidc -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Api/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:48897", 8 | "sslPort": 44374 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "http://localhost:5181", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "launchUrl": "swagger", 27 | "applicationUrl": "https://localhost:7169;http://localhost:5181", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "launchUrl": "swagger", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Api/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:48897", 8 | "sslPort": 44374 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "http://localhost:5181", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "launchUrl": "swagger", 27 | "applicationUrl": "https://localhost:7169;http://localhost:5181", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "launchUrl": "swagger", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Api/MunsonPickles.Api.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | d6c3f055-e5ac-48fb-afa6-b7f94a4abc10 8 | Linux 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Api/MunsonPickles.Api.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | d6c3f055-e5ac-48fb-afa6-b7f94a4abc10 8 | Linux 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Api/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:48897", 8 | "sslPort": 44374 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "http://localhost:5181", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "launchUrl": "swagger", 27 | "applicationUrl": "https://localhost:7169;http://localhost:5181", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "launchUrl": "swagger", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "http": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "dotnetRunMessages": true, 10 | "applicationUrl": "http://localhost:5298" 11 | }, 12 | "https": { 13 | "commandName": "Project", 14 | "launchBrowser": true, 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | }, 18 | "dotnetRunMessages": true, 19 | "applicationUrl": "https://localhost:7075;http://localhost:5298" 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | }, 28 | "Docker": { 29 | "commandName": "Docker", 30 | "launchBrowser": true, 31 | "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", 32 | "publishAllPorts": true, 33 | "useSSL": true 34 | } 35 | }, 36 | "iisSettings": { 37 | "windowsAuthentication": false, 38 | "anonymousAuthentication": true, 39 | "iisExpress": { 40 | "applicationUrl": "http://localhost:28283", 41 | "sslPort": 44336 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "http": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "dotnetRunMessages": true, 10 | "applicationUrl": "http://localhost:5298" 11 | }, 12 | "https": { 13 | "commandName": "Project", 14 | "launchBrowser": true, 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | }, 18 | "dotnetRunMessages": true, 19 | "applicationUrl": "https://localhost:7075;http://localhost:5298" 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | }, 28 | "Docker": { 29 | "commandName": "Docker", 30 | "launchBrowser": true, 31 | "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", 32 | "publishAllPorts": true, 33 | "useSSL": true 34 | } 35 | }, 36 | "iisSettings": { 37 | "windowsAuthentication": false, 38 | "anonymousAuthentication": true, 39 | "iisExpress": { 40 | "applicationUrl": "http://localhost:28283", 41 | "sslPort": 44336 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Components/ProductList.razor: -------------------------------------------------------------------------------- 1 | 2 | @inject ProductService productService 3 | 4 | @if (Products == null) 5 | { 6 |

We're picking the pickles!

7 | } 8 | else 9 | { 10 |
11 | 12 | 13 | @context.Name 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | } 26 | 27 | @code { 28 | private IQueryable? Products { get; set; } 29 | private Product? SelectedProduct { get; set; } = null; 30 | 31 | protected override async Task OnInitializedAsync() 32 | { 33 | Products = (await productService.GetAllProducts()).AsQueryable(); 34 | } 35 | 36 | void LeaveReview(Product product) 37 | { 38 | SelectedProduct = product; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Components/ProductList.razor: -------------------------------------------------------------------------------- 1 | 2 | @inject ProductService productService 3 | 4 | @if (Products == null) 5 | { 6 |

We're picking the pickles!

7 | } 8 | else 9 | { 10 |
11 | 12 | 13 | @context.Name 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | } 26 | 27 | @code { 28 | private IQueryable? Products { get; set; } 29 | private Product? SelectedProduct { get; set; } = null; 30 | 31 | protected override async Task OnInitializedAsync() 32 | { 33 | Products = (await productService.GetAllProducts()).AsQueryable(); 34 | } 35 | 36 | void LeaveReview(Product product) 37 | { 38 | SelectedProduct = product; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Components/ProductList.razor: -------------------------------------------------------------------------------- 1 | 2 | @inject ProductService productService 3 | 4 | @if (Products == null) 5 | { 6 |

We're picking the pickles!

7 | } 8 | else 9 | { 10 |
11 | 12 | 13 | @context.Name 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | } 26 | 27 | @code { 28 | private IQueryable? Products { get; set; } 29 | private Product? SelectedProduct { get; set; } = null; 30 | 31 | protected override async Task OnInitializedAsync() 32 | { 33 | Products = (await productService.GetAllProducts()).AsQueryable(); 34 | } 35 | 36 | void LeaveReview(Product product) 37 | { 38 | SelectedProduct = product; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Components/ProductList.razor: -------------------------------------------------------------------------------- 1 | 2 | @inject ProductService productService 3 | 4 | @if (Products == null) 5 | { 6 |

We're picking the pickles!

7 | } 8 | else 9 | { 10 |
11 | 12 | 13 | @context.Name 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | } 26 | 27 | @code { 28 | private IQueryable? Products { get; set; } 29 | private Product? SelectedProduct { get; set; } = null; 30 | 31 | protected override async Task OnInitializedAsync() 32 | { 33 | Products = (await productService.GetAllProducts()).AsQueryable(); 34 | } 35 | 36 | void LeaveReview(Product product) 37 | { 38 | SelectedProduct = product; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /2-deploy-and-data/MunsonPickles/MunsonPickles.Web/Components/ProductList.razor: -------------------------------------------------------------------------------- 1 | 2 | @inject ProductService productService 3 | 4 | @if (Products == null) 5 | { 6 |

We're picking the pickles!

7 | } 8 | else 9 | { 10 |
11 | 12 | 13 | @context.Name 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | } 26 | 27 | @code { 28 | private IQueryable? Products { get; set; } 29 | private Product? SelectedProduct { get; set; } = null; 30 | 31 | protected override async Task OnInitializedAsync() 32 | { 33 | Products = (await productService.GetAllProducts()).AsQueryable(); 34 | } 35 | 36 | void LeaveReview(Product product) 37 | { 38 | SelectedProduct = product; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Components/ProductList.razor: -------------------------------------------------------------------------------- 1 | 2 | @inject ProductService productService 3 | 4 | @if (Products == null) 5 | { 6 |

We're picking the pickles!

7 | } 8 | else 9 | { 10 |
11 | 12 | 13 | @context.Name 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | } 26 | 27 | @code { 28 | private IQueryable? Products { get; set; } 29 | private Product? SelectedProduct { get; set; } = null; 30 | 31 | protected override async Task OnInitializedAsync() 32 | { 33 | 34 | 35 | Products = (await productService.GetAllProducts()).AsQueryable(); 36 | } 37 | 38 | void LeaveReview(Product product) 39 | { 40 | SelectedProduct = product; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/MunsonPickles.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | b6412a9f-8427-4da8-b28a-f6b47a60c0a3 8 | Linux 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /6-containers/MunsonPickles.Web/Pages/ProductDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/productdetails/{productId:int}" 2 | 3 | @inject ProductService productService 4 | 5 | @if(product is null) 6 | { 7 |

Still loading...

8 | } 9 | else 10 | { 11 |

@product?.Name

12 | 13 |
14 |
15 |
16 |

@product?.Description

17 |
18 |
19 | 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 |
33 | 34 | 35 | } 36 | 37 | 38 | @code { 39 | [Parameter] 40 | public int ProductId { get; set; } 41 | 42 | Product? product; 43 | 44 | protected override async Task OnInitializedAsync() 45 | { 46 | product = await productService.GetProductById(ProductId); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/Pages/ProductDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/productdetails/{productId:int}" 2 | 3 | @inject ProductService productService 4 | 5 | @if(product is null) 6 | { 7 |

Still loading...

8 | } 9 | else 10 | { 11 |

@product?.Name

12 | 13 |
14 |
15 |
16 |

@product?.Description

17 |
18 |
19 | 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 |
33 | 34 | 35 | } 36 | 37 | 38 | @code { 39 | [Parameter] 40 | public int ProductId { get; set; } 41 | 42 | Product? product; 43 | 44 | protected override async Task OnInitializedAsync() 45 | { 46 | product = await productService.GetProductById(ProductId); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /5-managed-identity/MunsonPickles.Web/Pages/ProductDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/productdetails/{productId:int}" 2 | 3 | @inject ProductService productService 4 | 5 | @if(product is null) 6 | { 7 |

Still loading...

8 | } 9 | else 10 | { 11 |

@product?.Name

12 | 13 |
14 |
15 |
16 |

@product?.Description

17 |
18 |
19 | 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 |
33 | 34 | 35 | } 36 | 37 | 38 | @code { 39 | [Parameter] 40 | public int ProductId { get; set; } 41 | 42 | Product? product; 43 | 44 | protected override async Task OnInitializedAsync() 45 | { 46 | product = await productService.GetProductById(ProductId); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /4-identity/MunsonPickles/MunsonPickles.Web/Pages/ProductDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/productdetails/{productId:int}" 2 | 3 | @inject ProductService productService 4 | 5 | @if(product is null) 6 | { 7 |

Still loading...

8 | } 9 | else 10 | { 11 |

@product?.Name

12 | 13 |
14 |
15 |
16 |

@product?.Description

17 |
18 |
19 | 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 |
33 | 34 | 35 | } 36 | 37 | 38 | @code { 39 | [Parameter] 40 | public int ProductId { get; set; } 41 | 42 | Product? product; 43 | 44 | protected override async Task OnInitializedAsync() 45 | { 46 | product = await productService.GetProductById(ProductId); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /3-blob-storage/MunsonPickles/MunsonPickles.Web/Pages/ProductDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/productdetails/{productId:int}" 2 | 3 | @inject ProductService productService 4 | 5 | @if(product is null) 6 | { 7 |

Still loading...

8 | } 9 | else 10 | { 11 |

@product?.Name

12 | 13 |
14 |
15 |
16 |

@product?.Description

17 |
18 |
19 | 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 |
33 | 34 | 35 | } 36 | 37 | 38 | @code { 39 | [Parameter] 40 | public int ProductId { get; set; } 41 | 42 | Product? product; 43 | 44 | protected override async Task OnInitializedAsync() 45 | { 46 | product = await productService.GetProductById(ProductId); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /4-identity-implemented-api/MunsonPickles.Web/Pages/ProductDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/productdetails/{productId:int}" 2 | 3 | @inject ProductService productService 4 | 5 | @if(product is null) 6 | { 7 |

Still loading...

8 | } 9 | else 10 | { 11 |

@product?.Name

12 | 13 |
14 |
15 |
16 |

@product?.Description

17 |
18 |
19 | 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 |
33 | 34 | 35 | } 36 | 37 | 38 | @code { 39 | [Parameter] 40 | public int ProductId { get; set; } 41 | 42 | Product? product; 43 | 44 | protected override async Task OnInitializedAsync() 45 | { 46 | product = await productService.GetProductById(ProductId); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Pages/ProductDetails.razor: -------------------------------------------------------------------------------- 1 | @page "/productdetails/{productId:int}" 2 | 3 | @inject ProductService productService 4 | 5 | @if(product is null) 6 | { 7 |

Still loading...

8 | } 9 | else 10 | { 11 |

@product?.Name

12 | 13 |
14 |
15 |
16 |

@product?.Description

17 |
18 |
19 | 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 |
33 | 34 | 35 | } 36 | 37 | 38 | @code { 39 | [Parameter] 40 | public int ProductId { get; set; } 41 | 42 | Product? product; 43 | 44 | protected override async Task OnInitializedAsync() 45 | { 46 | product = await productService.GetProductById(ProductId); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /7-functions/MunsonPickles.Web/MunsonPickles.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | b6412a9f-8427-4da8-b28a-f6b47a60c0a3 8 | Linux 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /4-identity-implemented/MunsonPickles/MunsonPickles.Web/Components/ProductList.razor: -------------------------------------------------------------------------------- 1 | 2 | @inject ProductService productService 3 | @inject IHttpContextAccessor httpContextAccessor 4 | 5 | @if (Products == null) 6 | { 7 |

We're picking the pickles!

8 | } 9 | else 10 | { 11 |
12 | 13 | 14 | @context.Name 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | } 27 | 28 | @code { 29 | private IQueryable? Products { get; set; } 30 | private Product? SelectedProduct { get; set; } = null; 31 | 32 | protected override async Task OnInitializedAsync() 33 | { 34 | Products = (await productService.GetAllProducts()).AsQueryable(); 35 | 36 | var user = httpContextAccessor?.HttpContext?.User!; 37 | } 38 | 39 | void LeaveReview(Product product) 40 | { 41 | SelectedProduct = product; 42 | } 43 | } 44 | --------------------------------------------------------------------------------