├── WebApps ├── WebStatus │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Home │ │ │ ├── Privacy.cshtml │ │ │ └── Index.cshtml │ │ └── Shared │ │ │ ├── _ValidationScriptsPartial.cshtml │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── js │ │ │ └── site.js │ │ ├── lib │ │ │ ├── jquery-validation-unobtrusive │ │ │ │ └── LICENSE.txt │ │ │ ├── jquery-validation │ │ │ │ └── LICENSE.md │ │ │ ├── bootstrap │ │ │ │ └── LICENSE │ │ │ └── jquery │ │ │ │ └── LICENSE.txt │ │ └── css │ │ │ └── site.css │ ├── appsettings.Development.json │ ├── Models │ │ └── ErrorViewModel.cs │ ├── WebStatus.csproj │ ├── Properties │ │ └── launchSettings.json │ ├── Dockerfile │ ├── Program.cs │ ├── Controllers │ │ └── HomeController.cs │ ├── appsettings.json │ └── Startup.cs └── AspnetRunBasics │ ├── Pages │ ├── _ViewStart.cshtml │ ├── Privacy.cshtml │ ├── _ViewImports.cshtml │ ├── Shared │ │ ├── _ValidationScriptsPartial.cshtml │ │ ├── _TopProductPartial.cshtml │ │ └── _ProductItemPartial.cshtml │ ├── Contact.cshtml.cs │ ├── Confirmation.cshtml │ ├── Confirmation.cshtml.cs │ ├── Privacy.cshtml.cs │ ├── Order.cshtml.cs │ ├── Error.cshtml.cs │ ├── Error.cshtml │ ├── Cart.cshtml.cs │ ├── CheckOut.cshtml.cs │ ├── Index.cshtml.cs │ ├── ProductDetail.cshtml.cs │ ├── Order.cshtml │ ├── Product.cshtml.cs │ └── Contact.cshtml │ ├── wwwroot │ ├── favicon.ico │ ├── images │ │ ├── placeholder.png │ │ ├── banner │ │ │ ├── banner1.png │ │ │ ├── banner2.png │ │ │ └── banner3.png │ │ └── product │ │ │ ├── product-1.png │ │ │ ├── product-2.png │ │ │ ├── product-3.png │ │ │ ├── product-4.png │ │ │ ├── product-5.png │ │ │ ├── product-6.png │ │ │ ├── product-7.png │ │ │ ├── productx1.png │ │ │ ├── productx2.png │ │ │ ├── productx3.png │ │ │ ├── productx4.png │ │ │ ├── productx5.png │ │ │ ├── productx6.png │ │ │ └── productx7.png │ └── css │ │ └── style.css │ ├── appsettings.Development.json │ ├── Services │ ├── IOrderService.cs │ ├── IBasketService.cs │ ├── ICatalogService.cs │ ├── OrderService.cs │ ├── BasketService.cs │ └── CatalogService.cs │ ├── Models │ ├── BasketModel.cs │ ├── BasketItemModel.cs │ ├── CatalogModel.cs │ ├── OrderResponseModel.cs │ └── BasketCheckoutModel.cs │ ├── appsettings.json │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Dockerfile │ ├── AspnetRunBasics.csproj │ └── Extensions │ └── HttpClientExtensions.cs ├── BuildingBlocks ├── EventBus.Messages │ ├── EventBus.Messages.csproj │ ├── Common │ │ └── EventBusConstants.cs │ └── Events │ │ ├── IntegrationBaseEvent.cs │ │ └── BasketCheckoutEvent.cs └── Common.Logging │ ├── Common.Logging.csproj │ ├── SeriLogger.cs │ └── LoggingDelegatingHandler.cs ├── Services ├── Ordering │ ├── Ordering.Domain │ │ ├── Ordering.Domain.csproj │ │ ├── Common │ │ │ ├── EntityBase.cs │ │ │ └── ValueObject.cs │ │ └── Entities │ │ │ └── Order.cs │ ├── Ordering.API │ │ ├── appsettings.Development.json │ │ ├── Mapper │ │ │ └── OrderingProfile.cs │ │ ├── appsettings.json │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Program.cs │ │ ├── Dockerfile │ │ ├── EventBusConsumer │ │ │ └── BasketCheckoutConsumer.cs │ │ ├── Ordering.API.csproj │ │ ├── Controllers │ │ │ └── OrderController.cs │ │ └── Extensions │ │ │ └── HostExtensions.cs │ ├── Ordering.Application │ │ ├── Models │ │ │ ├── Email.cs │ │ │ └── EmailSettings.cs │ │ ├── Features │ │ │ └── Orders │ │ │ │ ├── Commands │ │ │ │ ├── DeleteOrder │ │ │ │ │ ├── DeleteOrderCommand.cs │ │ │ │ │ └── DeleteOrderCommandHandler.cs │ │ │ │ ├── UpdateOrder │ │ │ │ │ ├── UpdateOrderCommandValidator.cs │ │ │ │ │ ├── UpdateOrderCommand.cs │ │ │ │ │ └── UpdateOrderCommandHandler.cs │ │ │ │ └── CheckoutOrder │ │ │ │ │ ├── CheckoutOrderCommandValidator.cs │ │ │ │ │ ├── CheckoutOrderCommand.cs │ │ │ │ │ └── CheckoutOrderCommandHandler.cs │ │ │ │ └── Queries │ │ │ │ └── GetOrdersList │ │ │ │ ├── GetOrdersListQuery.cs │ │ │ │ ├── OrdersVm.cs │ │ │ │ └── GetOrdersListQueryHandler.cs │ │ ├── Contracts │ │ │ ├── Infrastructure │ │ │ │ └── IEmailService.cs │ │ │ └── Persistence │ │ │ │ ├── IOrderRepository.cs │ │ │ │ └── IAsyncRepository.cs │ │ ├── Exceptions │ │ │ ├── NotFoundException.cs │ │ │ └── ValidationException.cs │ │ ├── Mappings │ │ │ └── MappingProfile.cs │ │ ├── Ordering.Application.csproj │ │ ├── ApplicationServiceRegistration.cs │ │ └── Behaviours │ │ │ ├── UnhandledExceptionBehaviour.cs │ │ │ └── ValidationBehaviour.cs │ └── Ordering.Infrastructure │ │ ├── Ordering.Infrastructure.csproj │ │ ├── Repositories │ │ └── OrderRepository.cs │ │ ├── Persistence │ │ ├── OrderContextSeed.cs │ │ └── OrderContext.cs │ │ ├── InfrastructureServiceRegistration.cs │ │ ├── Mail │ │ └── EmailService.cs │ │ └── Migrations │ │ └── 20210213134039_InitialCreate.cs ├── Basket │ ├── Basket.API │ │ ├── appsettings.Development.json │ │ ├── Mapper │ │ │ └── BasketProfile.cs │ │ ├── Entities │ │ │ ├── ShoppingCartItem.cs │ │ │ ├── ShoppingCart.cs │ │ │ └── BasketCheckout.cs │ │ ├── Repositories │ │ │ ├── Interfaces │ │ │ │ └── IBasketRepository.cs │ │ │ └── BasketRepository.cs │ │ ├── Basket - Backup.API.csproj │ │ ├── appsettings.json │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── GrpcServices │ │ │ └── DiscountGrpcService.cs │ │ ├── Dockerfile │ │ └── Basket.API.csproj │ └── Basket.UnitTests │ │ ├── UnitTest1.cs │ │ └── Basket.UnitTests.csproj ├── Discount │ ├── Discount.API │ │ ├── appsettings.Development.json │ │ ├── Entities │ │ │ └── Coupon.cs │ │ ├── Repositories │ │ │ ├── Interfaces │ │ │ │ └── IDiscountRepository.cs │ │ │ └── DiscountRepository.cs │ │ ├── appsettings.json │ │ ├── Discount - Backup.API.csproj │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Program.cs │ │ ├── Dockerfile │ │ ├── Discount.API.csproj │ │ ├── Controllers │ │ │ └── DiscountController.cs │ │ └── Startup.cs │ ├── Discount.Grpc │ │ ├── appsettings.Development.json │ │ ├── Entities │ │ │ └── Coupon.cs │ │ ├── Mapper │ │ │ └── DiscountProfile.cs │ │ ├── Repositories │ │ │ ├── Interfaces │ │ │ │ └── IDiscountRepository.cs │ │ │ └── DiscountRepository.cs │ │ ├── appsettings.json │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Dockerfile │ │ ├── Protos │ │ │ └── discount.proto │ │ ├── Program.cs │ │ ├── Discount.Grpc.csproj │ │ ├── Startup.cs │ │ └── Services │ │ │ └── DiscountService.cs │ └── Discount.UnitTests │ │ ├── UnitTest1.cs │ │ └── Discount.UnitTests.csproj └── Catalog │ ├── Catalog.UnitTests │ ├── UnitTest1.cs │ ├── Properties │ │ └── launchSettings.json │ └── Catalog.UnitTests.csproj │ └── Catalog.API │ ├── Data │ ├── Interfaces │ │ └── ICatalogContext.cs │ └── CatalogContext.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Entities │ └── Product.cs │ ├── Program.cs │ ├── Repositories │ ├── Interfaces │ │ └── IProductRepository.cs │ └── ProductRepository.cs │ ├── Properties │ └── launchSettings.json │ ├── Dockerfile │ ├── Catalog.API.csproj │ └── Startup.cs ├── ApiGateways ├── OcelotApiGw │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Properties │ │ └── launchSettings.json │ ├── OcelotApiGw.csproj │ ├── Dockerfile │ ├── Program.cs │ └── Startup.cs └── Shopping.Aggregator │ ├── appsettings.Development.json │ ├── Services │ ├── IBasketService.cs │ ├── IOrderService.cs │ ├── ICatalogService.cs │ ├── BasketService.cs │ ├── OrderService.cs │ └── CatalogService.cs │ ├── Models │ ├── ShoppingModel.cs │ ├── BasketModel.cs │ ├── CatalogModel.cs │ ├── BasketItemExtendedModel.cs │ └── OrderResponseModel.cs │ ├── Shopping - Backup.Aggregator.csproj │ ├── appsettings.json │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Extensions │ └── HttpClientExtensions.cs │ ├── Dockerfile │ ├── Shopping.Aggregator.csproj │ └── Controllers │ └── ShoppingController.cs ├── .dockerignore ├── docker-compose.dcproj ├── docker-compose.yml └── .gitattributes /WebApps/WebStatus/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /WebApps/WebStatus/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/WebStatus/wwwroot/favicon.ico -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/favicon.ico -------------------------------------------------------------------------------- /WebApps/WebStatus/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebStatus 2 | @using WebStatus.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/placeholder.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/banner/banner1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/banner/banner1.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/banner/banner2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/banner/banner2.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/banner/banner3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/banner/banner3.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/product-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/product-1.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/product-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/product-2.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/product-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/product-3.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/product-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/product-4.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/product-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/product-5.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/product-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/product-6.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/product-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/product-7.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/productx1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/productx1.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/productx2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/productx2.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/productx3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/productx3.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/productx4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/productx4.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/productx5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/productx5.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/productx6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/productx6.png -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/wwwroot/images/product/productx7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/aspnetrun-microservices/HEAD/WebApps/AspnetRunBasics/wwwroot/images/product/productx7.png -------------------------------------------------------------------------------- /WebApps/WebStatus/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |
Use this page to detail your site's privacy policy.
7 | -------------------------------------------------------------------------------- /BuildingBlocks/EventBus.Messages/EventBus.Messages.csproj: -------------------------------------------------------------------------------- 1 |Use this page to detail your site's privacy policy.
9 | -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using AspnetRunBasics 2 | @using AspnetRunBasics.Models 3 | @namespace AspnetRunBasics.Pages 4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 5 | @addTagHelper *, AspnetRunBasics -------------------------------------------------------------------------------- /BuildingBlocks/EventBus.Messages/Common/EventBusConstants.cs: -------------------------------------------------------------------------------- 1 | namespace EventBus.Messages.Common 2 | { 3 | public static class EventBusConstants 4 | { 5 | public const string BasketCheckoutQueue = "basketcheckout-queue"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WebApps/WebStatus/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/Pages/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /WebApps/WebStatus/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ApiGateways/OcelotApiGw/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Services/Basket/Basket.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ApiGateways/Shopping.Aggregator/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Services/Discount/Discount.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Services/Ordering/Ordering.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Services/Basket/Basket.UnitTests/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xunit; 3 | 4 | namespace Basket.UnitTests 5 | { 6 | public class UnitTest1 7 | { 8 | [Fact] 9 | public void Test1() 10 | { 11 | 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Services/Discount/Discount.Grpc/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WebApps/WebStatus/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your JavaScript code. 5 | -------------------------------------------------------------------------------- /Services/Catalog/Catalog.UnitTests/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xunit; 3 | 4 | namespace Catalog.UnitTests 5 | { 6 | public class UnitTest1 7 | { 8 | [Fact] 9 | public void Test1() 10 | { 11 | 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Services/Discount/Discount.UnitTests/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xunit; 3 | 4 | namespace Discount.UnitTests 5 | { 6 | public class UnitTest1 7 | { 8 | [Fact] 9 | public void Test1() 10 | { 11 | 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Services/Ordering/Ordering.Application/Models/Email.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.Application.Models 2 | { 3 | public class Email 4 | { 5 | public string To { get; set; } 6 | public string Subject { get; set; } 7 | public string Body { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WebApps/WebStatus/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Home Page"; 3 | } 4 | 5 |Learn about building Web apps with ASP.NET Core.
8 |If you have any further questions, you can contact us 501-222-2222.
18 |
13 | Request ID: @Model.RequestId
14 |
19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |
21 |22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |
27 | -------------------------------------------------------------------------------- /WebApps/WebStatus/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |
12 | Request ID: @Model.RequestId
13 |
18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |
20 |21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |
26 | -------------------------------------------------------------------------------- /Services/Discount/Discount.Grpc/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:5.0-buster-slim AS base 4 | WORKDIR /app 5 | EXPOSE 80 6 | 7 | FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build 8 | WORKDIR /src 9 | COPY ["Services/Discount/Discount.Grpc/Discount.Grpc.csproj", "Services/Discount/Discount.Grpc/"] 10 | COPY ["BuildingBlocks/Common.Logging/Common.Logging.csproj", "BuildingBlocks/Common.Logging/"] 11 | RUN dotnet restore "Services/Discount/Discount.Grpc/Discount.Grpc.csproj" 12 | COPY . . 13 | WORKDIR "/src/Services/Discount/Discount.Grpc" 14 | RUN dotnet build "Discount.Grpc.csproj" -c Release -o /app/build 15 | 16 | FROM build AS publish 17 | RUN dotnet publish "Discount.Grpc.csproj" -c Release -o /app/publish 18 | 19 | FROM base AS final 20 | WORKDIR /app 21 | COPY --from=publish /app/publish . 22 | ENTRYPOINT ["dotnet", "Discount.Grpc.dll"] -------------------------------------------------------------------------------- /Services/Discount/Discount.Grpc/Protos/discount.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option csharp_namespace = "Discount.Grpc.Protos"; 4 | 5 | service DiscountProtoService { 6 | 7 | rpc GetDiscount (GetDiscountRequest) returns (CouponModel); 8 | 9 | rpc CreateDiscount (CreateDiscountRequest) returns (CouponModel); 10 | rpc UpdateDiscount (UpdateDiscountRequest) returns (CouponModel); 11 | rpc DeleteDiscount (DeleteDiscountRequest) returns (DeleteDiscountResponse); 12 | } 13 | 14 | message GetDiscountRequest { 15 | string productName = 1; 16 | } 17 | 18 | message CouponModel { 19 | int32 id = 1; 20 | string productName = 2; 21 | string description = 3; 22 | int32 amount = 4; 23 | } 24 | 25 | message CreateDiscountRequest { 26 | CouponModel coupon = 1; 27 | } 28 | 29 | message UpdateDiscountRequest { 30 | CouponModel coupon = 1; 31 | } 32 | 33 | message DeleteDiscountRequest { 34 | string productName = 1; 35 | } 36 | 37 | message DeleteDiscountResponse { 38 | bool success = 1; 39 | } -------------------------------------------------------------------------------- /Services/Ordering/Ordering.Application/ApplicationServiceRegistration.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using FluentValidation; 3 | using MediatR; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Ordering.Application.Behaviours; 6 | using System.Reflection; 7 | 8 | namespace Ordering.Application 9 | { 10 | public static class ApplicationServiceRegistration 11 | { 12 | public static IServiceCollection AddApplicationServices(this IServiceCollection services) 13 | { 14 | services.AddAutoMapper(Assembly.GetExecutingAssembly()); 15 | services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly()); 16 | services.AddMediatR(Assembly.GetExecutingAssembly()); 17 | 18 | services.AddTransient(typeof(IPipelineBehavior<,>), typeof(UnhandledExceptionBehaviour<,>)); 19 | services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehaviour<,>)); 20 | 21 | return services; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Services/Ordering/Ordering.Application/Features/Orders/Queries/GetOrdersList/OrdersVm.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.Application.Features.Orders.Queries.GetOrdersList 2 | { 3 | public class OrdersVm 4 | { 5 | public int Id { get; set; } 6 | public string UserName { get; set; } 7 | public decimal TotalPrice { get; set; } 8 | 9 | // BillingAddress 10 | public string FirstName { get; set; } 11 | public string LastName { get; set; } 12 | public string EmailAddress { get; set; } 13 | public string AddressLine { get; set; } 14 | public string Country { get; set; } 15 | public string State { get; set; } 16 | public string ZipCode { get; set; } 17 | 18 | // Payment 19 | public string CardName { get; set; } 20 | public string CardNumber { get; set; } 21 | public string Expiration { get; set; } 22 | public string CVV { get; set; } 23 | public int PaymentMethod { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WebApps/AspnetRunBasics/AspnetRunBasics.csproj: -------------------------------------------------------------------------------- 1 |@Model.Price $
14 |@Model.Summary
8 |@Model.Price $
11 |