├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .dockerignore ├── .gitattributes ├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── SECURITY.md ├── deploy └── k8s │ ├── azure-cli-check.sh │ ├── build-to-acr.services │ ├── build-to-acr.sh │ ├── certificates │ ├── .gitignore │ └── create-self-signed-certificate.sh │ ├── cleanup-service-principal.sh │ ├── create-acr.sh │ ├── create-aks.sh │ ├── deploy-application.sh │ ├── deploy-secrets.sh │ ├── helm-simple │ ├── apigateway │ │ ├── Chart.yaml │ │ └── templates │ │ │ └── ingress-gateway.yaml │ ├── backgroundtasks │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ └── service.yaml │ ├── basket │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ ├── ingress.yaml │ │ │ └── service.yaml │ ├── basketdata │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── deployment.yaml │ │ │ └── service.yaml │ ├── catalog │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ ├── ingress.yaml │ │ │ └── service.yaml │ ├── coupon │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ ├── ingress.yaml │ │ │ └── service.yaml │ ├── identity │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ ├── ingress.yaml │ │ │ └── service.yaml │ ├── nosqldata │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── deployment.yaml │ │ │ └── service.yaml │ ├── ordering │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ ├── ingress.yaml │ │ │ └── service.yaml │ ├── payment │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ └── service.yaml │ ├── rabbitmq │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── deployment.yaml │ │ │ └── service.yaml │ ├── seq │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── deployment.yaml │ │ │ ├── ingress.yaml │ │ │ └── service.yaml │ ├── signalr │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ └── service.yaml │ ├── sqldata │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── deployment.yaml │ │ │ └── service.yaml │ ├── webshoppingagg │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ └── service.yaml │ ├── webspa │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ ├── ingress.yaml │ │ │ └── service.yaml │ └── webstatus │ │ ├── Chart.yaml │ │ └── templates │ │ ├── configmap.yaml │ │ ├── deployment.yaml │ │ ├── ingress.yaml │ │ └── service.yaml │ ├── ingress-controller │ └── nginx-controller.yaml │ ├── quickstart.sh │ └── theme.sh ├── eShop-Learn.sln ├── src ├── ApiGateways │ ├── Aggregators │ │ └── Web.Shopping.HttpAggregator │ │ │ ├── Config │ │ │ └── UrlsConfig.cs │ │ │ ├── Controllers │ │ │ ├── BasketController.cs │ │ │ ├── CouponController.cs │ │ │ ├── HomeController.cs │ │ │ └── OrderController.cs │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.acr │ │ │ ├── Filters │ │ │ └── AuthorizeCheckOperationFilter.cs │ │ │ ├── Infrastructure │ │ │ └── HttpClientAuthorizationDelegatingHandler.cs │ │ │ ├── Models │ │ │ ├── AddBasketItemRequest.cs │ │ │ ├── BasketData.cs │ │ │ ├── CatalogItem.cs │ │ │ ├── CouponData.cs │ │ │ ├── OrderData.cs │ │ │ ├── OrderItemData.cs │ │ │ ├── UpdateBasketItemsRequest.cs │ │ │ └── UpdateBasketRequest.cs │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ └── launchSettings.json │ │ │ ├── Services │ │ │ ├── BasketService.cs │ │ │ ├── CatalogService.cs │ │ │ ├── CouponService.cs │ │ │ ├── GrpcCallerService.cs │ │ │ ├── IBasketService.cs │ │ │ ├── ICatalogService.cs │ │ │ ├── ICouponService.cs │ │ │ ├── IOrderApiClient.cs │ │ │ ├── IOrderingService.cs │ │ │ ├── OrderApiClient.cs │ │ │ └── OrderingService.cs │ │ │ ├── Startup.cs │ │ │ ├── Web.Shopping.HttpAggregator.csproj │ │ │ ├── appsettings.Development.json │ │ │ ├── appsettings.json │ │ │ ├── appsettings.localhost.json │ │ │ ├── azds.yaml │ │ │ └── values.dev.yaml │ └── Envoy │ │ └── config │ │ └── webshopping │ │ └── envoy.yaml ├── BuildingBlocks │ ├── EventBus │ │ ├── EventBus │ │ │ ├── Abstractions │ │ │ │ ├── IDynamicIntegrationEventHandler.cs │ │ │ │ ├── IEventBus.cs │ │ │ │ └── IIntegrationEventHandler.cs │ │ │ ├── EventBus.csproj │ │ │ ├── Events │ │ │ │ └── IntegrationEvent.cs │ │ │ ├── Extensions │ │ │ │ └── GenericTypeExtensions.cs │ │ │ ├── IEventBusSubscriptionsManager.cs │ │ │ ├── InMemoryEventBusSubscriptionsManager.cs │ │ │ └── SubscriptionInfo.cs │ │ ├── EventBusRabbitMQ │ │ │ ├── DefaultRabbitMQPersistentConnection.cs │ │ │ ├── EventBusRabbitMQ.cs │ │ │ ├── EventBusRabbitMQ.csproj │ │ │ └── IRabbitMQPersistentConnection.cs │ │ ├── EventBusServiceBus │ │ │ ├── DefaultServiceBusPersisterConnection.cs │ │ │ ├── EventBusServiceBus.cs │ │ │ ├── EventBusServiceBus.csproj │ │ │ └── IServiceBusPersisterConnection.cs │ │ └── IntegrationEventLogEF │ │ │ ├── EventStateEnum.cs │ │ │ ├── IntegrationEventLogContext.cs │ │ │ ├── IntegrationEventLogEF.csproj │ │ │ ├── IntegrationEventLogEntry.cs │ │ │ ├── Services │ │ │ ├── IIntegrationEventLogService.cs │ │ │ └── IntegrationEventLogService.cs │ │ │ └── Utilities │ │ │ └── ResilientTransaction.cs │ └── WebHost │ │ └── WebHost.Customization │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── WebHost.Customization.csproj │ │ └── WebHostExtensions.cs ├── Services │ ├── Basket │ │ └── Basket.API │ │ │ ├── .dockerignore │ │ │ ├── Auth │ │ │ ├── Client │ │ │ │ ├── enable-token-client.js │ │ │ │ ├── oidc-token-manager.js │ │ │ │ └── popup.html │ │ │ └── Server │ │ │ │ └── AuthorizationHeaderParameterOperationFilter.cs │ │ │ ├── Basket.API.csproj │ │ │ ├── BasketSettings.cs │ │ │ ├── Controllers │ │ │ ├── BasketController.cs │ │ │ └── HomeController.cs │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.acr │ │ │ ├── Grpc │ │ │ └── BasketService.cs │ │ │ ├── Infrastructure │ │ │ ├── ActionResults │ │ │ │ └── InternalServerErrorObjectResult.cs │ │ │ ├── Exceptions │ │ │ │ ├── BasketDomainException.cs │ │ │ │ └── FailingMiddlewareAppBuilderExtensions.cs │ │ │ ├── Filters │ │ │ │ ├── HttpGlobalExceptionFilter.cs │ │ │ │ ├── JsonErrorResponse.cs │ │ │ │ └── ValidateModelStateFilter.cs │ │ │ ├── Middlewares │ │ │ │ ├── AuthorizeCheckOperationFilter.cs │ │ │ │ ├── ByPassAuthMiddleware.cs │ │ │ │ ├── FailingMiddleware.cs │ │ │ │ ├── FailingOptions.cs │ │ │ │ ├── FailingStartupFilter.cs │ │ │ │ └── FailingWebHostBuilderExtensions.cs │ │ │ └── Repositories │ │ │ │ └── RedisBasketRepository.cs │ │ │ ├── IntegrationEvents │ │ │ ├── EventHandling │ │ │ │ ├── OrderStartedIntegrationEventHandler.cs │ │ │ │ └── ProductPriceChangedIntegrationEventHandler.cs │ │ │ └── Events │ │ │ │ ├── OrderStartedIntegrationEvent.cs │ │ │ │ ├── ProductPriceChangedIntegrationEvent.cs │ │ │ │ └── UserCheckoutAcceptedIntegrationEvent.cs │ │ │ ├── Model │ │ │ ├── BasketCheckout.cs │ │ │ ├── BasketItem.cs │ │ │ ├── CustomerBasket.cs │ │ │ └── IBasketRepository.cs │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ └── launchSettings.json │ │ │ ├── Proto │ │ │ └── basket.proto │ │ │ ├── README.md │ │ │ ├── Services │ │ │ ├── IIdentityService.cs │ │ │ └── IdentityService.cs │ │ │ ├── Startup.cs │ │ │ ├── TestHttpResponseTrailersFeature.cs │ │ │ ├── appsettings.Development.json │ │ │ ├── appsettings.json │ │ │ ├── azds.yaml │ │ │ ├── values.dev.yaml │ │ │ └── web.config │ ├── Catalog │ │ └── Catalog.API │ │ │ ├── Catalog.API.csproj │ │ │ ├── CatalogSettings.cs │ │ │ ├── Controllers │ │ │ ├── CatalogController.cs │ │ │ ├── HomeController.cs │ │ │ └── PicController.cs │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.acr │ │ │ ├── Extensions │ │ │ ├── CatalogItemExtensions.cs │ │ │ ├── HostExtensions.cs │ │ │ ├── LinqSelectExtensions.cs │ │ │ └── WebHostExtensions.cs │ │ │ ├── Grpc │ │ │ └── CatalogService.cs │ │ │ ├── Infrastructure │ │ │ ├── ActionResults │ │ │ │ └── InternalServerErrorObjectResult.cs │ │ │ ├── CatalogContext.cs │ │ │ ├── CatalogContextSeed.cs │ │ │ ├── CatalogMigrations │ │ │ │ ├── 20161103152832_Initial.Designer.cs │ │ │ │ ├── 20161103152832_Initial.cs │ │ │ │ ├── 20161103153420_UpdateTableNames.Designer.cs │ │ │ │ ├── 20161103153420_UpdateTableNames.cs │ │ │ │ ├── 20170314083211_AddEventTable.Designer.cs │ │ │ │ ├── 20170314083211_AddEventTable.cs │ │ │ │ ├── 20170316012921_RefactoringToIntegrationEventLog.Designer.cs │ │ │ │ ├── 20170316012921_RefactoringToIntegrationEventLog.cs │ │ │ │ ├── 20170316120022_RefactoringEventBusNamespaces.Designer.cs │ │ │ │ ├── 20170316120022_RefactoringEventBusNamespaces.cs │ │ │ │ ├── 20170322124244_RemoveIntegrationEventLogs.Designer.cs │ │ │ │ ├── 20170322124244_RemoveIntegrationEventLogs.cs │ │ │ │ ├── 20170509130025_AddStockProductItem.Designer.cs │ │ │ │ ├── 20170509130025_AddStockProductItem.cs │ │ │ │ ├── 20170530133114_AddPictureFileName.Designer.cs │ │ │ │ ├── 20170530133114_AddPictureFileName.cs │ │ │ │ └── CatalogContextModelSnapshot.cs │ │ │ ├── EntityConfigurations │ │ │ │ ├── CatalogBrandEntityTypeConfiguration.cs │ │ │ │ ├── CatalogItemEntityTypeConfiguration.cs │ │ │ │ └── CatalogTypeEntityTypeConfiguration.cs │ │ │ ├── Exceptions │ │ │ │ └── CatalogDomainException.cs │ │ │ ├── Filters │ │ │ │ └── HttpGlobalExceptionFilter.cs │ │ │ └── IntegrationEventMigrations │ │ │ │ ├── 20170322145434_IntegrationEventInitial.Designer.cs │ │ │ │ ├── 20170322145434_IntegrationEventInitial.cs │ │ │ │ ├── 20190507184807_AddTransactionId.Designer.cs │ │ │ │ ├── 20190507184807_AddTransactionId.cs │ │ │ │ ├── IntegrationEventLogContextDesignTimeFactory.cs │ │ │ │ └── IntegrationEventLogContextModelSnapshot.cs │ │ │ ├── IntegrationEvents │ │ │ ├── CatalogIntegrationEventService.cs │ │ │ ├── EventHandling │ │ │ │ ├── AnyFutureIntegrationEventHandler.cs.txt │ │ │ │ ├── OrderStatusChangedToAwaitingStockValidationIntegrationEventHandler.cs │ │ │ │ └── OrderStatusChangedToPaidIntegrationEventHandler.cs │ │ │ ├── Events │ │ │ │ ├── OrderStatusChangedToAwaitingStockValidationIntegrationEvent.cs │ │ │ │ ├── OrderStatusChangedToPaidIntegrationEvent.cs │ │ │ │ ├── OrderStockConfirmedIntegrationEvent.cs │ │ │ │ ├── OrderStockRejectedIntegrationEvent.cs │ │ │ │ └── ProductPriceChangedIntegrationEvent.cs │ │ │ └── ICatalogIntegrationEventService.cs │ │ │ ├── Model │ │ │ ├── CatalogBrand.cs │ │ │ ├── CatalogItem.cs │ │ │ └── CatalogType.cs │ │ │ ├── Pics │ │ │ ├── 1.png │ │ │ ├── 10.png │ │ │ ├── 11.png │ │ │ ├── 12.png │ │ │ ├── 13.png │ │ │ ├── 14.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ └── 9.png │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ └── launchSettings.json │ │ │ ├── Proto │ │ │ └── catalog.proto │ │ │ ├── README.md │ │ │ ├── Setup │ │ │ ├── CatalogBrands.csv │ │ │ ├── CatalogItems.csv │ │ │ ├── CatalogItems.zip │ │ │ └── CatalogTypes.csv │ │ │ ├── Startup.cs │ │ │ ├── ViewModel │ │ │ └── PaginatedItemsViewModel.cs │ │ │ ├── appsettings.Development.json │ │ │ ├── appsettings.json │ │ │ ├── azds.yaml │ │ │ ├── values.dev.yaml │ │ │ └── web.config │ ├── Coupon │ │ └── Coupon.API │ │ │ ├── Controllers │ │ │ └── CouponController.cs │ │ │ ├── Coupon.API.csproj │ │ │ ├── CouponSettings.cs │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.acr │ │ │ ├── Dtos │ │ │ ├── CouponDto.cs │ │ │ ├── IMapper.cs │ │ │ └── Mapper.cs │ │ │ ├── ExceptionTrigger.cs │ │ │ ├── Extensions │ │ │ ├── IHostBuilderExtensions.cs │ │ │ └── IServiceCollectionExtensions.cs │ │ │ ├── Filters │ │ │ ├── AuthorizeCheckOperationFilter.cs │ │ │ └── ValidateModelAttribute.cs │ │ │ ├── Infrastructure │ │ │ ├── CouponSeed.cs │ │ │ ├── Models │ │ │ │ └── Coupon.cs │ │ │ └── Repositories │ │ │ │ ├── CouponContext.cs │ │ │ │ ├── CouponRepository.cs │ │ │ │ └── ICouponRepository.cs │ │ │ ├── IntegrationEvents │ │ │ ├── EventHandlers │ │ │ │ ├── OrderStatusChangedToAwaitingCouponValidationIntegrationEventHandler.cs │ │ │ │ └── OrderStatusChangedToCancelledIntegrationEventHandler.cs │ │ │ └── Events │ │ │ │ ├── OrderCouponConfirmedIntegrationEvent.cs │ │ │ │ ├── OrderCouponRejectedIntegrationEvent.cs │ │ │ │ ├── OrderStatusChangedToAwaitingCouponValidationIntegrationEvent.cs │ │ │ │ └── OrderStatusChangedToCancelledIntegrationEvent.cs │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ └── launchSettings.json │ │ │ ├── Startup.cs │ │ │ ├── appsettings.Development.json │ │ │ └── appsettings.json │ ├── Identity │ │ └── Identity.API │ │ │ ├── .dockerignore │ │ │ ├── AppSettings.cs │ │ │ ├── Certificate │ │ │ ├── Certificate.cs │ │ │ └── idsrv3test.pfx │ │ │ ├── Configuration │ │ │ └── Config.cs │ │ │ ├── Controllers │ │ │ ├── AccountController.cs │ │ │ ├── ConsentController.cs │ │ │ └── HomeController.cs │ │ │ ├── Data │ │ │ ├── ApplicationDbContext.cs │ │ │ ├── ApplicationDbContextSeed.cs │ │ │ └── ConfigurationDbContextSeed.cs │ │ │ ├── Devspaces │ │ │ ├── DevspacesRedirectUriValidator.cs │ │ │ └── IdentityDevspacesBuilderExtensions.cs │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.acr │ │ │ ├── Extensions │ │ │ └── LinqSelectExtensions.cs │ │ │ ├── Factories │ │ │ ├── ApplicationDbContextFactory.cs │ │ │ ├── ConfigurationDbContextFactory.cs │ │ │ └── PersistedGrantDbContextFactory.cs │ │ │ ├── IWebHostExtensions.cs │ │ │ ├── Identity.API.csproj │ │ │ ├── Migrations │ │ │ ├── 20190729091724_InitialMigration.Designer.cs │ │ │ ├── 20190729091724_InitialMigration.cs │ │ │ ├── ApplicationDbContextModelSnapshot.cs │ │ │ ├── ConfigurationDb │ │ │ │ ├── 20190729092011_InitialConfigurationMigration.Designer.cs │ │ │ │ ├── 20190729092011_InitialConfigurationMigration.cs │ │ │ │ └── ConfigurationDbContextModelSnapshot.cs │ │ │ └── PersistedGrantDb │ │ │ │ ├── 20190729092100_InitialPersistedGrantMigration.Designer.cs │ │ │ │ ├── 20190729092100_InitialPersistedGrantMigration.cs │ │ │ │ └── PersistedGrantDbContextModelSnapshot.cs │ │ │ ├── Models │ │ │ ├── AccountViewModels │ │ │ │ ├── ConsentInputModel.cs │ │ │ │ ├── ConsentViewModel.cs │ │ │ │ ├── ForgotPasswordViewModel.cs │ │ │ │ ├── LoggedOutViewModel.cs │ │ │ │ ├── LoginViewModel.cs │ │ │ │ ├── LogoutViewModel.cs │ │ │ │ ├── RegisterViewModel.cs │ │ │ │ ├── ResetPasswordViewModel.cs │ │ │ │ ├── SendCodeViewModel.cs │ │ │ │ └── VerifyCodeViewModel.cs │ │ │ ├── ApplicationUser.cs │ │ │ ├── ErrorViewModel.cs │ │ │ └── ManageViewModels │ │ │ │ ├── AddPhoneNumberViewModel.cs │ │ │ │ ├── ChangePasswordViewModel.cs │ │ │ │ ├── ConfigureTwoFactorViewModel.cs │ │ │ │ ├── FactorViewModel.cs │ │ │ │ ├── IndexViewModel.cs │ │ │ │ ├── SetPasswordViewModel.cs │ │ │ │ └── VerifyPhoneNumberViewModel.cs │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ └── launchSettings.json │ │ │ ├── README.md │ │ │ ├── Services │ │ │ ├── EFLoginService.cs │ │ │ ├── ILoginService.cs │ │ │ ├── IRedirectService.cs │ │ │ ├── ProfileService.cs │ │ │ └── RedirectService.cs │ │ │ ├── Setup │ │ │ ├── Users.csv │ │ │ └── images.zip │ │ │ ├── Startup.cs │ │ │ ├── Views │ │ │ ├── Account │ │ │ │ ├── LoggedOut.cshtml │ │ │ │ ├── Login.cshtml │ │ │ │ ├── Logout.cshtml │ │ │ │ ├── Redirecting.cshtml │ │ │ │ └── Register.cshtml │ │ │ ├── Consent │ │ │ │ ├── Index.cshtml │ │ │ │ └── _ScopeListItem.cshtml │ │ │ ├── Home │ │ │ │ └── Index.cshtml │ │ │ ├── Shared │ │ │ │ ├── Error.cshtml │ │ │ │ ├── _Layout.cshtml │ │ │ │ ├── _LoginPartial.cshtml │ │ │ │ ├── _ValidationScriptsPartial.cshtml │ │ │ │ └── _ValidationSummary.cshtml │ │ │ ├── _ViewImports.cshtml │ │ │ └── _ViewStart.cshtml │ │ │ ├── appsettings.json │ │ │ ├── azds.yaml │ │ │ ├── bundleconfig.json │ │ │ ├── libman.json │ │ │ ├── values.dev.yaml │ │ │ ├── web.config │ │ │ └── wwwroot │ │ │ ├── _references.js │ │ │ ├── css │ │ │ ├── site.css │ │ │ └── site.min.css │ │ │ ├── favicon.ico │ │ │ ├── fonts │ │ │ ├── Oswald-Bold.eot │ │ │ ├── Oswald-Bold.svg │ │ │ ├── Oswald-Bold.ttf │ │ │ ├── Oswald-Bold.woff │ │ │ ├── Oswald-Bold.woff2 │ │ │ ├── Oswald-ExtraLight.eot │ │ │ ├── Oswald-ExtraLight.svg │ │ │ ├── Oswald-ExtraLight.ttf │ │ │ ├── Oswald-ExtraLight.woff │ │ │ ├── Oswald-ExtraLight.woff2 │ │ │ ├── Oswald-Light.eot │ │ │ ├── Oswald-Light.svg │ │ │ ├── Oswald-Light.ttf │ │ │ ├── Oswald-Light.woff │ │ │ ├── Oswald-Light.woff2 │ │ │ ├── Oswald-Medium.eot │ │ │ ├── Oswald-Medium.svg │ │ │ ├── Oswald-Medium.ttf │ │ │ ├── Oswald-Medium.woff │ │ │ ├── Oswald-Medium.woff2 │ │ │ ├── Oswald-Regular.eot │ │ │ ├── Oswald-Regular.svg │ │ │ ├── Oswald-Regular.ttf │ │ │ ├── Oswald-Regular.woff │ │ │ ├── Oswald-Regular.woff2 │ │ │ ├── Oswald-SemiBold.eot │ │ │ ├── Oswald-SemiBold.svg │ │ │ ├── Oswald-SemiBold.ttf │ │ │ ├── Oswald-SemiBold.woff │ │ │ └── Oswald-SemiBold.woff2 │ │ │ ├── icon.jpg │ │ │ ├── icon.png │ │ │ ├── images │ │ │ ├── arrow-down.png │ │ │ ├── arrow-right.svg │ │ │ ├── banner1.svg │ │ │ ├── banner2.svg │ │ │ ├── banner3.svg │ │ │ ├── banner4.svg │ │ │ ├── brand.PNG │ │ │ ├── brand_dark.PNG │ │ │ ├── cart.png │ │ │ ├── header.jpg │ │ │ ├── logo.svg │ │ │ ├── logo_color.svg │ │ │ ├── logout.PNG │ │ │ ├── main_banner.png │ │ │ ├── main_banner_text.png │ │ │ ├── main_banner_text.svg │ │ │ ├── main_footer_text.PNG │ │ │ ├── my_orders.PNG │ │ │ └── refresh.svg │ │ │ ├── js │ │ │ ├── site.js │ │ │ └── site.min.js │ │ │ └── lib │ │ │ ├── bootstrap │ │ │ └── dist │ │ │ │ ├── css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ └── bootstrap.min.js │ │ │ ├── jquery-validate │ │ │ ├── jquery.validate.js │ │ │ └── jquery.validate.min.js │ │ │ ├── jquery-validation-unobtrusive │ │ │ ├── jquery.validate.unobtrusive.js │ │ │ └── jquery.validate.unobtrusive.min.js │ │ │ └── jquery │ │ │ ├── core.js │ │ │ ├── jquery.js │ │ │ ├── jquery.min.js │ │ │ ├── jquery.min.map │ │ │ ├── jquery.slim.js │ │ │ ├── jquery.slim.min.js │ │ │ └── jquery.slim.min.map │ ├── Ordering │ │ ├── Ordering.API │ │ │ ├── Application │ │ │ │ ├── Behaviors │ │ │ │ │ ├── LoggingBehavior.cs │ │ │ │ │ ├── TransactionBehaviour.cs │ │ │ │ │ └── ValidatorBehavior.cs │ │ │ │ ├── Commands │ │ │ │ │ ├── CancelOrderCommand.cs │ │ │ │ │ ├── CancelOrderCommandHandler.cs │ │ │ │ │ ├── CouponConfirmedCommand.cs │ │ │ │ │ ├── CouponConfirmedCommandHandler.cs │ │ │ │ │ ├── CreateOrderCommand.cs │ │ │ │ │ ├── CreateOrderCommandHandler.cs │ │ │ │ │ ├── CreateOrderDraftCommand.cs │ │ │ │ │ ├── CreateOrderDraftCommandHandler.cs │ │ │ │ │ ├── IdentifiedCommand.cs │ │ │ │ │ ├── IdentifiedCommandHandler.cs │ │ │ │ │ ├── SetAwaitingStockValidationStatusCommand.cs │ │ │ │ │ ├── SetAwaitingStockValidationStatusCommandHandler.cs │ │ │ │ │ ├── SetPaidOrderStatusCommand.cs │ │ │ │ │ ├── SetPaidOrderStatusCommandHandler.cs │ │ │ │ │ ├── SetStockRejectedOrderStatusCommand.cs │ │ │ │ │ ├── SetStockRejectedOrderStatusCommandHandler.cs │ │ │ │ │ ├── ShipOrderCommand.cs │ │ │ │ │ ├── ShipOrderCommandHandler.cs │ │ │ │ │ ├── StockConfirmedCommand.cs │ │ │ │ │ └── StockConfirmedCommandHandler.cs │ │ │ │ ├── DomainEventHandlers │ │ │ │ │ ├── BuyerAndPaymentMethodVerified │ │ │ │ │ │ └── UpdateOrderWhenBuyerAndPaymentMethodVerifiedDomainEventHandler.cs │ │ │ │ │ ├── OrderCancelled │ │ │ │ │ │ └── OrderCancelledDomainEventHandler.cs │ │ │ │ │ ├── OrderCoupon │ │ │ │ │ │ └── OrderStatusChangedToAwaitingCouponValidationDomainEventHandler.cs │ │ │ │ │ ├── OrderGracePeriodConfirmed │ │ │ │ │ │ └── OrderStatusChangedToAwaitingStockValidationDomainEventHandler.cs │ │ │ │ │ ├── OrderPaid │ │ │ │ │ │ └── OrderStatusChangedToPaidDomainEventHandler.cs │ │ │ │ │ ├── OrderShipped │ │ │ │ │ │ └── OrderShippedDomainEventHandler.cs │ │ │ │ │ ├── OrderStartedEvent │ │ │ │ │ │ ├── SendEmailToCustomerWhenOrderStartedDomainEventHandler.cs │ │ │ │ │ │ └── ValidateOrAddBuyerAggregateWhenOrderStartedDomainEventHandler.cs │ │ │ │ │ └── OrderValidated │ │ │ │ │ │ └── OrderStatusChangedToValidatedDomainEventHandler.cs │ │ │ │ ├── IntegrationEvents │ │ │ │ │ ├── EventHandling │ │ │ │ │ │ ├── GracePeriodConfirmedIntegrationEventHandler.cs │ │ │ │ │ │ ├── OrderCouponConfirmedIntegrationEventHandler.cs │ │ │ │ │ │ ├── OrderCouponRejectedIntegrationEventHandler.cs │ │ │ │ │ │ ├── OrderPaymentFailedIntegrationEventHandler.cs │ │ │ │ │ │ ├── OrderPaymentSucceededIntegrationEventHandler.cs │ │ │ │ │ │ ├── OrderStockConfirmedIntegrationEventHandler.cs │ │ │ │ │ │ ├── OrderStockRejectedIntegrationEventHandler.cs │ │ │ │ │ │ └── UserCheckoutAcceptedIntegrationEventHandler.cs │ │ │ │ │ ├── Events │ │ │ │ │ │ ├── GracePeriodConfirmedIntegrationEvent.cs │ │ │ │ │ │ ├── OrderCouponConfirmedIntegrationEvent.cs │ │ │ │ │ │ ├── OrderCouponRejectedIntegrationEvent.cs │ │ │ │ │ │ ├── OrderPaymentFailedIntegrationEvent .cs │ │ │ │ │ │ ├── OrderPaymentSucceededIntegrationEvent.cs │ │ │ │ │ │ ├── OrderStartedIntegrationEvent.cs │ │ │ │ │ │ ├── OrderStatusChangedToAwaitingCouponValidationIntegrationEvent.cs │ │ │ │ │ │ ├── OrderStatusChangedToAwaitingStockValidationIntegrationEvent.cs │ │ │ │ │ │ ├── OrderStatusChangedToCancelledIntegrationEvent.cs │ │ │ │ │ │ ├── OrderStatusChangedToPaidIntegrationEvent.cs │ │ │ │ │ │ ├── OrderStatusChangedToShippedIntegrationEvent.cs │ │ │ │ │ │ ├── OrderStatusChangedToValidatedIntegrationEvent.cs │ │ │ │ │ │ ├── OrderStatusChangedTosubmittedIntegrationEvent.cs │ │ │ │ │ │ ├── OrderStockConfirmedIntegrationEvent.cs │ │ │ │ │ │ ├── OrderStockRejectedIntegrationEvent.cs │ │ │ │ │ │ └── UserCheckoutAcceptedIntegrationEvent.cs │ │ │ │ │ ├── IOrderingIntegrationEventService.cs │ │ │ │ │ └── OrderingIntegrationEventService.cs │ │ │ │ ├── Models │ │ │ │ │ ├── BasketItem.cs │ │ │ │ │ └── CustomerBasket.cs │ │ │ │ ├── Queries │ │ │ │ │ ├── IOrderQueries.cs │ │ │ │ │ ├── OrderQueries.cs │ │ │ │ │ └── OrderViewModel.cs │ │ │ │ └── Validations │ │ │ │ │ ├── CancelOrderCommandValidator.cs │ │ │ │ │ ├── CreateOrderCommandValidator.cs │ │ │ │ │ ├── IdentifiedCommandValidator.cs │ │ │ │ │ └── ShipOrderCommandValidator.cs │ │ │ ├── Controllers │ │ │ │ ├── HomeController.cs │ │ │ │ └── OrdersController.cs │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.acr │ │ │ ├── Extensions │ │ │ │ ├── BasketItemExtensions.cs │ │ │ │ └── LinqSelectExtensions.cs │ │ │ ├── Grpc │ │ │ │ └── OrderingService.cs │ │ │ ├── Infrastructure │ │ │ │ ├── ActionResults │ │ │ │ │ └── InternalServerErrorObjectResult.cs │ │ │ │ ├── Auth │ │ │ │ │ └── AuthorizationHeaderParameterOperationFilter.cs │ │ │ │ ├── AutofacModules │ │ │ │ │ ├── ApplicationModule.cs │ │ │ │ │ └── MediatorModule.cs │ │ │ │ ├── Factories │ │ │ │ │ └── OrderingDbContextFactory.cs │ │ │ │ ├── Filters │ │ │ │ │ ├── AuthorizeCheckOperationFilter.cs │ │ │ │ │ └── HttpGlobalExceptionFilter.cs │ │ │ │ ├── IntegrationEventMigrations │ │ │ │ │ ├── 20170330131634_IntegrationEventInitial.Designer.cs │ │ │ │ │ ├── 20170330131634_IntegrationEventInitial.cs │ │ │ │ │ ├── 20190507185219_AddTransactionId.Designer.cs │ │ │ │ │ ├── 20190507185219_AddTransactionId.cs │ │ │ │ │ ├── IntegrationEventLogContextDesignTimeFactory.cs │ │ │ │ │ └── IntegrationEventLogContextModelSnapshot.cs │ │ │ │ ├── Middlewares │ │ │ │ │ └── ByPassAuthMiddleware.cs │ │ │ │ ├── Migrations │ │ │ │ │ ├── 20170208181933_Initial.Designer.cs │ │ │ │ │ ├── 20170208181933_Initial.cs │ │ │ │ │ ├── 20170303085729_RequestsTable.Designer.cs │ │ │ │ │ ├── 20170303085729_RequestsTable.cs │ │ │ │ │ ├── 20170313100034_Domain_events.Designer.cs │ │ │ │ │ ├── 20170313100034_Domain_events.cs │ │ │ │ │ ├── 20170403082405_NoBuyerPropertyInOrder.Designer.cs │ │ │ │ │ ├── 20170403082405_NoBuyerPropertyInOrder.cs │ │ │ │ │ ├── 20170405110939_NoPaymentMethodPropertyInOrder.Designer.cs │ │ │ │ │ ├── 20170405110939_NoPaymentMethodPropertyInOrder.cs │ │ │ │ │ ├── 20170511112333_AddOrderDescription.Designer.cs │ │ │ │ │ ├── 20170511112333_AddOrderDescription.cs │ │ │ │ │ ├── 20170713111342_AdressAsValueObject.Designer.cs │ │ │ │ │ ├── 20170713111342_AdressAsValueObject.cs │ │ │ │ │ ├── 20180412143935_NamePropertyInBuyer.Designer.cs │ │ │ │ │ ├── 20180412143935_NamePropertyInBuyer.cs │ │ │ │ │ ├── 20190808132242_Change_Relation_Of_Orders.Designer.cs │ │ │ │ │ ├── 20190808132242_Change_Relation_Of_Orders.cs │ │ │ │ │ ├── 20200302140353_AddDiscountCouponMigration.Designer.cs │ │ │ │ │ ├── 20200302140353_AddDiscountCouponMigration.cs │ │ │ │ │ ├── 20200317130640_AddCouponCodeMigration.Designer.cs │ │ │ │ │ ├── 20200317130640_AddCouponCodeMigration.cs │ │ │ │ │ ├── 20200318113949_AddDiscountConfirmationMigration.Designer.cs │ │ │ │ │ ├── 20200318113949_AddDiscountConfirmationMigration.cs │ │ │ │ │ └── OrderingContextModelSnapshot.cs │ │ │ │ ├── OrderingContextSeed.cs │ │ │ │ └── Services │ │ │ │ │ ├── IIdentityService.cs │ │ │ │ │ └── IdentityService.cs │ │ │ ├── Ordering.API.csproj │ │ │ ├── OrderingSettings.cs │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── launchSettings.json │ │ │ ├── Proto │ │ │ │ └── ordering.proto │ │ │ ├── README.md │ │ │ ├── Setup │ │ │ │ └── CardTypes.csv │ │ │ ├── Startup.cs │ │ │ ├── appsettings.json │ │ │ ├── azds.yaml │ │ │ └── web.config │ │ ├── Ordering.BackgroundTasks │ │ │ ├── BackgroundTaskSettings.cs │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.acr │ │ │ ├── Events │ │ │ │ └── GracePeriodConfirmedIntegrationEvent.cs │ │ │ ├── Extensions │ │ │ │ └── CustomExtensionMethods.cs │ │ │ ├── Ordering.BackgroundTasks.csproj │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── launchSettings.json │ │ │ ├── Startup.cs │ │ │ ├── Tasks │ │ │ │ └── GracePeriodManagerTask.cs │ │ │ ├── appsettings.Development.json │ │ │ └── appsettings.json │ │ ├── Ordering.Domain │ │ │ ├── AggregatesModel │ │ │ │ ├── BuyerAggregate │ │ │ │ │ ├── Buyer.cs │ │ │ │ │ ├── CardType.cs │ │ │ │ │ ├── IBuyerRepository.cs │ │ │ │ │ └── PaymentMethod.cs │ │ │ │ └── OrderAggregate │ │ │ │ │ ├── Address.cs │ │ │ │ │ ├── IOrderRepository.cs │ │ │ │ │ ├── Order.cs │ │ │ │ │ ├── OrderItem.cs │ │ │ │ │ └── OrderStatus.cs │ │ │ ├── Events │ │ │ │ ├── BuyerPaymentMethodVerifiedDomainEvent.cs │ │ │ │ ├── OrderCancelledDomainEvent.cs │ │ │ │ ├── OrderShippedDomainEvent.cs │ │ │ │ ├── OrderStartedDomainEvent.cs │ │ │ │ ├── OrderStatusChangedToAwaitingCouponValidationDomainEvent.cs │ │ │ │ ├── OrderStatusChangedToAwaitingStockValidationDomainEvent.cs │ │ │ │ ├── OrderStatusChangedToPaidDomainEvent.cs │ │ │ │ └── OrderStatusChangedToValidatedDomainEvent.cs │ │ │ ├── Exceptions │ │ │ │ └── OrderingDomainException.cs │ │ │ ├── Ordering.Domain.csproj │ │ │ └── SeedWork │ │ │ │ ├── Entity.cs │ │ │ │ ├── Enumeration.cs │ │ │ │ ├── IAggregateRoot.cs │ │ │ │ ├── IRepository.cs │ │ │ │ ├── IUnitOfWork.cs │ │ │ │ └── ValueObject.cs │ │ ├── Ordering.Infrastructure │ │ │ ├── EntityConfigurations │ │ │ │ ├── BuyerEntityTypeConfiguration.cs │ │ │ │ ├── CardTypeEntityTypeConfiguration.cs │ │ │ │ ├── ClientRequestEntityTypeConfiguration.cs │ │ │ │ ├── OrderEntityTypeConfiguration.cs │ │ │ │ ├── OrderItemEntityTypeConfiguration.cs │ │ │ │ ├── OrderStatusEntityTypeConfiguration.cs │ │ │ │ └── PaymentMethodEntityTypeConfiguration.cs │ │ │ ├── Idempotency │ │ │ │ ├── ClientRequest.cs │ │ │ │ ├── IRequestManager.cs │ │ │ │ └── RequestManager.cs │ │ │ ├── MediatorExtension.cs │ │ │ ├── Ordering.Infrastructure.csproj │ │ │ ├── OrderingContext.cs │ │ │ └── Repositories │ │ │ │ ├── BuyerRepository.cs │ │ │ │ └── OrderRepository.cs │ │ └── Ordering.SignalrHub │ │ │ ├── AutofacModules │ │ │ └── ApplicationModule.cs │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.acr │ │ │ ├── IntegrationEvents │ │ │ ├── EventHandling │ │ │ │ ├── OrderStatusChangedToAwaitingCouponValidationIntegrationEventHandler.cs │ │ │ │ ├── OrderStatusChangedToAwaitingStockValidationIntegrationEventHandler.cs │ │ │ │ ├── OrderStatusChangedToCancelledIntegrationEventHandler.cs │ │ │ │ ├── OrderStatusChangedToPaidIntegrationEventHandler.cs │ │ │ │ ├── OrderStatusChangedToShippedIntegrationEventHandler.cs │ │ │ │ ├── OrderStatusChangedToSubmittedIntegrationEventHandler.cs │ │ │ │ └── OrderStatusChangedToValidatedIntegrationEventHandler.cs │ │ │ └── Events │ │ │ │ ├── OrderStatusChangedToAwaitingCouponValidationIntegrationEvent.cs │ │ │ │ ├── OrderStatusChangedToAwaitingStockValidationIntegrationEvent.cs │ │ │ │ ├── OrderStatusChangedToCancelledIntegrationEvent.cs │ │ │ │ ├── OrderStatusChangedToPaidIntegrationEvent.cs │ │ │ │ ├── OrderStatusChangedToShippedIntegrationEvent.cs │ │ │ │ ├── OrderStatusChangedToSubmittedIntegrationEvent.cs │ │ │ │ └── OrderStatusChangedToValidatedIntegrationEvent.cs │ │ │ ├── NotificationHub.cs │ │ │ ├── Ordering.SignalrHub.csproj │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ └── launchSettings.json │ │ │ ├── Startup.cs │ │ │ ├── appsettings.json │ │ │ └── azds.yaml │ └── Payment │ │ └── Payment.API │ │ ├── Dockerfile │ │ ├── Dockerfile.acr │ │ ├── IntegrationEvents │ │ ├── EventHandling │ │ │ └── OrderStatusChangedToValidatedIntegrationEventHandler.cs │ │ └── Events │ │ │ ├── OrderPaymentFailedIntegrationEvent.cs │ │ │ ├── OrderPaymentSucceededIntegrationEvent.cs │ │ │ └── OrderStatusChangedToValidatedIntegrationEvent.cs │ │ ├── Payment.API.csproj │ │ ├── PaymentSettings.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── azds.yaml └── Web │ ├── WebSPA │ ├── .gitignore │ ├── AppSettings.cs │ ├── Client │ │ ├── .npmignore │ │ ├── .sass-lint.yml │ │ ├── angular.json │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ ├── assets │ │ │ │ ├── .gitkeep │ │ │ │ ├── fonts │ │ │ │ │ ├── Oswald-Bold.eot │ │ │ │ │ ├── Oswald-Bold.svg │ │ │ │ │ ├── Oswald-Bold.ttf │ │ │ │ │ ├── Oswald-Bold.woff │ │ │ │ │ ├── Oswald-Bold.woff2 │ │ │ │ │ ├── Oswald-ExtraLight.eot │ │ │ │ │ ├── Oswald-ExtraLight.svg │ │ │ │ │ ├── Oswald-ExtraLight.ttf │ │ │ │ │ ├── Oswald-ExtraLight.woff │ │ │ │ │ ├── Oswald-ExtraLight.woff2 │ │ │ │ │ ├── Oswald-Light.eot │ │ │ │ │ ├── Oswald-Light.svg │ │ │ │ │ ├── Oswald-Light.ttf │ │ │ │ │ ├── Oswald-Light.woff │ │ │ │ │ ├── Oswald-Light.woff2 │ │ │ │ │ ├── Oswald-Medium.eot │ │ │ │ │ ├── Oswald-Medium.svg │ │ │ │ │ ├── Oswald-Medium.ttf │ │ │ │ │ ├── Oswald-Medium.woff │ │ │ │ │ ├── Oswald-Medium.woff2 │ │ │ │ │ ├── Oswald-Regular.eot │ │ │ │ │ ├── Oswald-Regular.svg │ │ │ │ │ ├── Oswald-Regular.ttf │ │ │ │ │ ├── Oswald-Regular.woff │ │ │ │ │ ├── Oswald-Regular.woff2 │ │ │ │ │ ├── Oswald-SemiBold.eot │ │ │ │ │ ├── Oswald-SemiBold.svg │ │ │ │ │ ├── Oswald-SemiBold.ttf │ │ │ │ │ ├── Oswald-SemiBold.woff │ │ │ │ │ └── Oswald-SemiBold.woff2 │ │ │ │ └── images │ │ │ │ │ ├── add.svg │ │ │ │ │ ├── arrow-right.svg │ │ │ │ │ ├── cart.svg │ │ │ │ │ ├── delete.svg │ │ │ │ │ ├── header.jpg │ │ │ │ │ ├── logo.svg │ │ │ │ │ ├── logo_color.svg │ │ │ │ │ ├── minus.svg │ │ │ │ │ ├── plus.svg │ │ │ │ │ ├── refresh.svg │ │ │ │ │ └── user.svg │ │ │ ├── environments │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── favicon.ico │ │ │ ├── guid.ts │ │ │ ├── index.html │ │ │ ├── main.ts │ │ │ ├── modules │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.scss │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.routes.ts │ │ │ │ ├── app.service.ts │ │ │ │ ├── basket │ │ │ │ │ ├── basket-status │ │ │ │ │ │ ├── basket-status.component.html │ │ │ │ │ │ ├── basket-status.component.scss │ │ │ │ │ │ └── basket-status.component.ts │ │ │ │ │ ├── basket.component.html │ │ │ │ │ ├── basket.component.scss │ │ │ │ │ ├── basket.component.ts │ │ │ │ │ ├── basket.module.ts │ │ │ │ │ └── basket.service.ts │ │ │ │ ├── campaigns │ │ │ │ │ ├── campaigns-detail │ │ │ │ │ │ ├── campaigns-detail.component.html │ │ │ │ │ │ ├── campaigns-detail.component.scss │ │ │ │ │ │ └── campaigns-detail.component.ts │ │ │ │ │ ├── campaigns.component.html │ │ │ │ │ ├── campaigns.component.scss │ │ │ │ │ ├── campaigns.component.ts │ │ │ │ │ ├── campaigns.module.ts │ │ │ │ │ └── campaigns.service.ts │ │ │ │ ├── catalog │ │ │ │ │ ├── catalog.component.html │ │ │ │ │ ├── catalog.component.scss │ │ │ │ │ ├── catalog.component.ts │ │ │ │ │ ├── catalog.module.ts │ │ │ │ │ └── catalog.service.ts │ │ │ │ ├── orders │ │ │ │ │ ├── orders-detail │ │ │ │ │ │ ├── orders-detail.component.html │ │ │ │ │ │ ├── orders-detail.component.scss │ │ │ │ │ │ └── orders-detail.component.ts │ │ │ │ │ ├── orders-new │ │ │ │ │ │ ├── orders-new.component.html │ │ │ │ │ │ ├── orders-new.component.scss │ │ │ │ │ │ └── orders-new.component.ts │ │ │ │ │ ├── orders.component.html │ │ │ │ │ ├── orders.component.scss │ │ │ │ │ ├── orders.component.ts │ │ │ │ │ ├── orders.module.ts │ │ │ │ │ └── orders.service.ts │ │ │ │ └── shared │ │ │ │ │ ├── components │ │ │ │ │ ├── header │ │ │ │ │ │ ├── header.html │ │ │ │ │ │ ├── header.scss │ │ │ │ │ │ └── header.ts │ │ │ │ │ ├── identity │ │ │ │ │ │ ├── identity.html │ │ │ │ │ │ ├── identity.scss │ │ │ │ │ │ └── identity.ts │ │ │ │ │ ├── page-not-found │ │ │ │ │ │ ├── page-not-found.component.html │ │ │ │ │ │ ├── page-not-found.component.scss │ │ │ │ │ │ ├── page-not-found.component.spec.ts │ │ │ │ │ │ └── page-not-found.component.ts │ │ │ │ │ └── pager │ │ │ │ │ │ ├── pager.html │ │ │ │ │ │ ├── pager.scss │ │ │ │ │ │ └── pager.ts │ │ │ │ │ ├── models │ │ │ │ │ ├── basket.model.ts │ │ │ │ │ ├── basketCheckout.model.ts │ │ │ │ │ ├── basketItem.model.ts │ │ │ │ │ ├── campaign.model.ts │ │ │ │ │ ├── campaignItem.model.ts │ │ │ │ │ ├── catalog.model.ts │ │ │ │ │ ├── catalogBrand.model.ts │ │ │ │ │ ├── catalogItem.model.ts │ │ │ │ │ ├── catalogType.model.ts │ │ │ │ │ ├── configuration.model.ts │ │ │ │ │ ├── coupon.model.ts │ │ │ │ │ ├── identity.model.ts │ │ │ │ │ ├── order-detail.model.ts │ │ │ │ │ ├── order.model.ts │ │ │ │ │ ├── orderItem.model.ts │ │ │ │ │ └── pager.model.ts │ │ │ │ │ ├── pipes │ │ │ │ │ ├── uppercase.pipe.spec.ts │ │ │ │ │ └── uppercase.pipe.ts │ │ │ │ │ ├── services │ │ │ │ │ ├── basket.wrapper.service.ts │ │ │ │ │ ├── configuration.service.ts │ │ │ │ │ ├── data.service.ts │ │ │ │ │ ├── notification.service.ts │ │ │ │ │ ├── security.service.ts │ │ │ │ │ ├── signalr.service.ts │ │ │ │ │ └── storage.service.ts │ │ │ │ │ └── shared.module.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles │ │ │ │ ├── _bootstrap-overrides.scss │ │ │ │ ├── _button.scss │ │ │ │ ├── _form.scss │ │ │ │ ├── _toastr.scss │ │ │ │ ├── _utilities.scss │ │ │ │ ├── _variables.scss │ │ │ │ └── globals.scss │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.spec.json │ │ │ └── typings.d.ts │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ ├── typedoc.json │ │ └── yarn.lock │ ├── Dockerfile │ ├── Dockerfile.acr │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Server │ │ ├── Controllers │ │ │ └── HomeController.cs │ │ └── Infrastructure │ │ │ └── WebContextSeed.cs │ ├── Setup │ │ └── images.zip │ ├── Startup.cs │ ├── WebSPA.csproj │ ├── appsettings.json │ └── web.config │ └── WebStatus │ ├── Controllers │ └── HomeController.cs │ ├── Dockerfile │ ├── Dockerfile.acr │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── Views │ ├── Home │ │ └── Config.cshtml │ └── Shared │ │ └── Error.cshtml │ ├── WebStatus.csproj │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── bundleconfig.json │ ├── libman.json │ └── wwwroot │ ├── css │ ├── site.css │ └── site.min.css │ ├── favicon.ico │ └── lib │ ├── bootstrap │ └── dist │ │ ├── css │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ │ └── js │ │ ├── bootstrap.js │ │ └── bootstrap.min.js │ └── jquery │ ├── core.js │ ├── jquery.js │ ├── jquery.min.js │ ├── jquery.min.map │ ├── jquery.slim.js │ ├── jquery.slim.min.js │ └── jquery.slim.min.map └── tests └── Services └── Coupon └── Coupon.API.Tests ├── Controllers └── CouponControllerTests.cs └── Coupon.API.Tests.csproj /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/dotnet/.devcontainer/base.Dockerfile 2 | 3 | # [Choice] .NET version: 6.0, 3.1, 6.0-bullseye, 3.1-bullseye, 6.0-focal, 3.1-focal 4 | ARG VARIANT="6.0-bullseye-slim" 5 | FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT} 6 | 7 | # [Choice] Node.js version: none, lts/*, 18, 16, 14 8 | ARG NODE_VERSION="none" 9 | RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi 10 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.dockerignore 3 | **/.env 4 | **/.git 5 | **/.gitignore 6 | **/.project 7 | **/.settings 8 | **/.sonarqube 9 | **/.toolstarget 10 | **/.vs 11 | **/.vscode 12 | **/*.*proj.user 13 | **/*.dbmdl 14 | **/*.jfm 15 | **/azds.yaml 16 | **/bin 17 | **/charts 18 | **/docker-compose*.yml 19 | **/Dockerfile* 20 | **/node_modules 21 | **/npm-debug.log 22 | **/obj 23 | **/secrets.dev.yaml 24 | **/values.dev.yaml 25 | **/WebSPA/wwwroot 26 | LICENSE 27 | **/README*.md -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Deploy a cloud-native ASP.NET Core microservice with GitHub Actions 2 | 3 | Welcome! This is the starter code repository for [this Microsoft Learn Training module](https://docs.microsoft.com/learn/modules/microservices-devops-aspnet-core/). We strongly suggest you follow along with the module for the best results. 4 | -------------------------------------------------------------------------------- /deploy/k8s/azure-cli-check.sh: -------------------------------------------------------------------------------- 1 | echo "Making sure you're signed in to Azure CLI..." 2 | az account show -o none 3 | 4 | if [ ! $? -eq 0 ] 5 | then 6 | exit 1 7 | fi 8 | 9 | echo "Using the following Azure subscription. If this isn't correct, press Ctrl+C and select the correct subscription with \"az account set\"" 10 | echo "${newline}" 11 | az account show -o table 12 | echo "${newline}" 13 | -------------------------------------------------------------------------------- /deploy/k8s/build-to-acr.services: -------------------------------------------------------------------------------- 1 | basket-api:basket.api>src/Services/Basket/Basket.API/Dockerfile 2 | catalog-api:catalog.api>src/Services/Catalog/Catalog.API/Dockerfile 3 | coupon-api:coupon.api>src/Services/Coupon/Coupon.API/Dockerfile 4 | identity-api:identity.api>src/Services/Identity/Identity.API/Dockerfile 5 | ordering-api:ordering.api>src/Services/Ordering/Ordering.API/Dockerfile 6 | ordering-backgroundtasks:ordering.backgroundtasks>src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile 7 | ordering-signalrhub:ordering.signalrhub>src/Services/Ordering/Ordering.SignalrHub/Dockerfile 8 | payment-api:payment.api>src/Services/Payment/Payment.API/Dockerfile 9 | webshoppingagg:webshoppingagg>src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Dockerfile 10 | webspa:webspa>src/Web/WebSPA/Dockerfile 11 | webstatus:webstatus>src/Web/WebStatus/Dockerfile -------------------------------------------------------------------------------- /deploy/k8s/certificates/.gitignore: -------------------------------------------------------------------------------- 1 | *.cer* 2 | *.key 3 | -------------------------------------------------------------------------------- /deploy/k8s/cleanup-service-principal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Color theming 4 | . <(cat ./theme.sh) 5 | 6 | echo "Deleting service principal(s)..." 7 | 8 | while IFS= read -r appId 9 | do 10 | echo "${newline} > ${azCliCommandStyle}az ad sp delete --id $appId${defaultTextStyle}${newline}" 11 | az ad sp delete --id $appId 12 | done < <(az ad sp list --show-mine --query "[?contains(displayName,'eshop-learn-sp')].appId" --output tsv) 13 | 14 | echo "Done!" -------------------------------------------------------------------------------- /deploy/k8s/deploy-secrets.sh: -------------------------------------------------------------------------------- 1 | kubectl delete secrets --field-selector metadata.name=tls-secret 2 | 3 | kubectl create secret tls tls-secret --cert ./certificates/self-signed.cert.pem --key ./certificates/self-signed.key 4 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/backgroundtasks/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: backgroundtasks-cm 5 | labels: 6 | app: eshop 7 | service: backgroundtasks 8 | data: 9 | OrchestratorType: K8S 10 | ASPNETCORE_ENVIRONMENT: Development 11 | ASPNETCORE_URLS: http://0.0.0.0:80 12 | EventBusConnection: rabbitmq 13 | AzureServiceBusEnabled: "False" 14 | ConnectionString: Server=sqldata;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word 15 | UseCustomizationData: "True" 16 | CheckUpdateTime: "15000" 17 | GracePeriodTime: "15" 18 | Serilog__MinimumLevel__Override__Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ: Verbose 19 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/backgroundtasks/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: ordering-backgroundtasks 5 | labels: 6 | app: eshop 7 | service: backgroundtasks 8 | spec: 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | name: http 13 | selector: 14 | service: backgroundtasks 15 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/basket/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: basket-cm 5 | labels: 6 | app: eshop 7 | service: basket 8 | data: 9 | ASPNETCORE_ENVIRONMENT: Development 10 | AzureServiceBusEnabled: "False" 11 | ConnectionString: basketdata 12 | EventBusConnection: rabbitmq 13 | identityUrl: http://identity-api 14 | IdentityUrlExternal: {{ .Values.protocol }}://{{ .Values.host }}/identity 15 | OrchestratorType: K8S 16 | PATH_BASE: /basket-api -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/basket/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: basket 5 | labels: 6 | app: eshop 7 | service: basket 8 | annotations: 9 | kubernetes.io/ingress.class: "nginx" 10 | spec: 11 | rules: 12 | {{- if .Values.useHostName }} 13 | - host: {{ .Values.host }} 14 | http: 15 | {{- else }} 16 | - http: 17 | {{- end }} 18 | paths: 19 | - path: /basket-api 20 | pathType: ImplementationSpecific 21 | backend: 22 | service: 23 | name: basket-api 24 | port: 25 | number: 80 -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/basket/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: basket-api 5 | labels: 6 | app: eshop 7 | service: basket 8 | spec: 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | name: http 13 | - port: 81 14 | protocol: TCP 15 | name: grpc 16 | selector: 17 | service: basket 18 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/basketdata/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: basketdata 5 | labels: 6 | app: eshop 7 | service: basketdata 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | service: basketdata 13 | template: 14 | metadata: 15 | labels: 16 | app: eshop 17 | service: basketdata 18 | spec: 19 | containers: 20 | - name: basketdata 21 | image: redis:alpine 22 | ports: 23 | - name: redis 24 | containerPort: 6379 25 | protocol: TCP 26 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/basketdata/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: basketdata 5 | labels: 6 | app: eshop 7 | service: basketdata 8 | spec: 9 | ports: 10 | - port: 6379 11 | protocol: TCP 12 | name: redis 13 | selector: 14 | service: basketdata 15 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/catalog/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: catalog-cm 5 | labels: 6 | app: eshop 7 | service: catalog 8 | data: 9 | ASPNETCORE_ENVIRONMENT: Development 10 | AzureServiceBusEnabled: "False" 11 | AzureStorageEnabled: "False" 12 | ConnectionString: Server=sqldata;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word 13 | EventBusConnection: rabbitmq 14 | GRPC_PORT: "81" 15 | OrchestratorType: K8S 16 | PATH_BASE: /catalog-api 17 | PicBaseUrl: "{{ .Values.protocol }}://{{ .Values.host }}/apigateway/c/api/v1/catalog/items/[0]/pic/" 18 | PORT: "80" 19 | UseCustomizationData: "False" 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/catalog/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: catalog 5 | labels: 6 | app: eshop 7 | service: catalog 8 | annotations: 9 | kubernetes.io/ingress.class: "nginx" 10 | spec: 11 | rules: 12 | {{- if .Values.useHostName }} 13 | - host: {{ .Values.host }} 14 | http: 15 | {{- else }} 16 | - http: 17 | {{- end }} 18 | paths: 19 | - path: /catalog-api 20 | pathType: ImplementationSpecific 21 | backend: 22 | service: 23 | name: catalog-api 24 | port: 25 | number: 80 -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/catalog/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: catalog-api 5 | labels: 6 | app: eshop 7 | service: catalog 8 | spec: 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | name: http 13 | - port: 81 14 | protocol: TCP 15 | name: grpc 16 | selector: 17 | service: catalog 18 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/coupon/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: coupon-cm 5 | labels: 6 | app: eshop 7 | service: coupon 8 | data: 9 | ASPNETCORE_ENVIRONMENT: Development 10 | ASPNETCORE_URLS: http://0.0.0.0:80 11 | AzureServiceBusEnabled: "False" 12 | CheckUpdateTime: "30000" 13 | ConnectionString: mongodb://nosqldata 14 | EventBusConnection: rabbitmq 15 | identityUrl: http://identity-api 16 | IdentityUrlExternal: {{ .Values.protocol }}://{{ .Values.host }}/identity 17 | OrchestratorType: K8S 18 | PATH_BASE: /coupon-api 19 | Serilog__MinimumLevel__Override__coupon-api: Verbose 20 | Serilog__MinimumLevel__Override__Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ: Verbose 21 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/coupon/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: coupon 5 | labels: 6 | app: eshop 7 | service: coupon 8 | annotations: 9 | kubernetes.io/ingress.class: "nginx" 10 | spec: 11 | rules: 12 | {{- if .Values.useHostName }} 13 | - host: {{ .Values.host }} 14 | http: 15 | {{- else }} 16 | - http: 17 | {{- end }} 18 | paths: 19 | - path: /coupon-api 20 | pathType: ImplementationSpecific 21 | backend: 22 | service: 23 | name: coupon-api 24 | port: 25 | number: 80 26 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/coupon/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: coupon-api 5 | labels: 6 | app: eshop 7 | service: coupon 8 | spec: 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | name: http 13 | selector: 14 | service: coupon 15 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/identity/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: identity 5 | labels: 6 | app: eshop 7 | service: identity 8 | annotations: 9 | kubernetes.io/ingress.class: "nginx" 10 | spec: 11 | rules: 12 | {{- if .Values.useHostName }} 13 | - host: {{ .Values.host }} 14 | http: 15 | {{- else }} 16 | - http: 17 | {{- end }} 18 | paths: 19 | - path: /identity 20 | pathType: ImplementationSpecific 21 | backend: 22 | service: 23 | name: identity-api 24 | port: 25 | number: 80 -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/identity/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: identity-api 5 | labels: 6 | app: eshop 7 | service: identity 8 | spec: 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | selector: 13 | service: identity 14 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/nosqldata/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: nosqldata 5 | labels: 6 | app: eshop 7 | service: nosqldata 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | service: nosqldata 13 | template: 14 | metadata: 15 | labels: 16 | app: eshop 17 | service: nosqldata 18 | spec: 19 | containers: 20 | - name: nosqldata 21 | image: mongo 22 | ports: 23 | - name: mongodb 24 | containerPort: 27017 25 | protocol: TCP 26 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/nosqldata/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: nosqldata 5 | labels: 6 | app: eshop 7 | service: nosqldata 8 | spec: 9 | ports: 10 | - port: 27017 11 | protocol: TCP 12 | selector: 13 | service: nosqldata 14 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/ordering/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: ordering 5 | labels: 6 | app: eshop 7 | service: ordering 8 | annotations: 9 | kubernetes.io/ingress.class: "nginx" 10 | spec: 11 | rules: 12 | {{- if .Values.useHostName }} 13 | - host: {{ .Values.host }} 14 | http: 15 | {{- else }} 16 | - http: 17 | {{- end }} 18 | paths: 19 | - path: /ordering-api 20 | pathType: ImplementationSpecific 21 | backend: 22 | service: 23 | name: ordering-api 24 | port: 25 | number: 80 -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/ordering/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: ordering-api 5 | labels: 6 | app: eshop 7 | service: ordering 8 | spec: 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | name: http 13 | - port: 81 14 | protocol: TCP 15 | name: grpc 16 | selector: 17 | service: ordering 18 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/payment/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: payment-cm 5 | labels: 6 | app: eshop 7 | service: payment 8 | data: 9 | ASPNETCORE_ENVIRONMENT: Development 10 | ASPNETCORE_URLS: http://0.0.0.0:80 11 | AzureServiceBusEnabled: "False" 12 | EventBusConnection: rabbitmq 13 | MaxOrderTotal: "100" 14 | OrchestratorType: K8S 15 | Serilog__MinimumLevel__Override__Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ: Verbose 16 | Serilog__MinimumLevel__Override__payment-api.IntegrationEvents.EventHandling: "Verbose" 17 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/payment/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: payment-api 5 | labels: 6 | app: eshop 7 | service: payment 8 | spec: 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | name: http 13 | selector: 14 | service: payment 15 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/rabbitmq/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: rabbitmq 5 | labels: 6 | app: eshop 7 | service: rabbitmq 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | service: rabbitmq 13 | template: 14 | metadata: 15 | labels: 16 | app: eshop 17 | service: rabbitmq 18 | spec: 19 | containers: 20 | - name: rabbitmq 21 | image: rabbitmq:3-management-alpine 22 | ports: 23 | - name: rabbitmq 24 | containerPort: 5672 25 | protocol: TCP 26 | - name: management 27 | containerPort: 15672 28 | protocol: TCP 29 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/rabbitmq/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: rabbitmq 5 | labels: 6 | app: eshop 7 | service: rabbitmq 8 | spec: 9 | ports: 10 | - port: 5672 11 | protocol: TCP 12 | name: rabbitmq 13 | selector: 14 | service: rabbitmq 15 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/seq/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: seq 5 | labels: 6 | app: eshop 7 | service: seq 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | service: seq 13 | template: 14 | metadata: 15 | labels: 16 | app: eshop 17 | service: seq 18 | spec: 19 | containers: 20 | - name: seq 21 | image: datalust/seq:latest 22 | ports: 23 | - name: http 24 | containerPort: 80 25 | protocol: TCP 26 | env: 27 | - name: ACCEPT_EULA 28 | value: "Y" 29 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/seq/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: seq 5 | labels: 6 | app: eshop 7 | service: seq 8 | annotations: 9 | kubernetes.io/ingress.class: "nginx" 10 | nginx.ingress.kubernetes.io/use-regex: "true" 11 | nginx.ingress.kubernetes.io/rewrite-target: /$2 12 | spec: 13 | rules: 14 | {{- if .Values.useHostName }} 15 | - host: {{ .Values.host }} 16 | http: 17 | {{- else }} 18 | - http: 19 | {{- end }} 20 | paths: 21 | - path: /seq(/|$)(.*) 22 | pathType: ImplementationSpecific 23 | backend: 24 | service: 25 | name: seq 26 | port: 27 | number: 80 -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/seq/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: seq 5 | labels: 6 | app: eshop 7 | service: seq 8 | spec: 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | name: http 13 | selector: 14 | service: seq 15 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/signalr/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: signalr-cm 5 | labels: 6 | app: eshop 7 | service: signalr 8 | data: 9 | ASPNETCORE_ENVIRONMENT: Development 10 | ASPNETCORE_URLS: http://0.0.0.0:80 11 | AzureServiceBusEnabled: "False" 12 | EventBusConnection: rabbitmq 13 | identityUrl: http://identity-api 14 | IsClusterEnv: "True" 15 | OrchestratorType: K8S 16 | PATH_BASE: /ordering-signalrhub 17 | SignalrStoreConnectionString: basketdata 18 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/signalr/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: ordering-signalrhub 5 | labels: 6 | app: eshop 7 | service: signalr 8 | spec: 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | name: http 13 | selector: 14 | service: signalr 15 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/sqldata/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: sqldata 5 | labels: 6 | app: eshop 7 | service: sqldata 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | service: sqldata 13 | template: 14 | metadata: 15 | labels: 16 | app: eshop 17 | service: sqldata 18 | spec: 19 | containers: 20 | - name: sqldata 21 | image: mcr.microsoft.com/mssql/server:2017-latest 22 | ports: 23 | - name: sqlserver 24 | containerPort: 1433 25 | protocol: TCP 26 | env: 27 | - name: SA_PASSWORD 28 | value: Pass@word 29 | - name: ACCEPT_EULA 30 | value: "Y" 31 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/sqldata/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: sqldata 5 | labels: 6 | app: eshop 7 | service: sqldata 8 | spec: 9 | ports: 10 | - port: 1433 11 | protocol: TCP 12 | selector: 13 | service: sqldata 14 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/webshoppingagg/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: webshoppingagg 5 | labels: 6 | app: eshop 7 | service: webshoppingagg 8 | spec: 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | name: http 13 | - port: 81 14 | protocol: TCP 15 | name: grpc 16 | selector: 17 | service: webshoppingagg 18 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/webspa/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: webspa 5 | labels: 6 | app: eshop 7 | service: webspa 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | service: webspa 13 | template: 14 | metadata: 15 | labels: 16 | app: eshop 17 | service: webspa 18 | spec: 19 | containers: 20 | - name: webspa 21 | image: {{ .Values.registry }}/webspa:linux-net6-coupon 22 | imagePullPolicy: {{ .Values.imagePullPolicy }} 23 | ports: 24 | - name: http 25 | containerPort: 80 26 | protocol: TCP 27 | envFrom: 28 | - configMapRef: 29 | name: webspa-cm 30 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/webspa/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: webspa 5 | labels: 6 | app: eshop 7 | service: webspa 8 | annotations: 9 | kubernetes.io/ingress.class: "nginx" 10 | spec: 11 | {{- if eq .Values.protocol "https" }} 12 | tls: 13 | - hosts: 14 | - {{ .Values.host }} 15 | secretName: tls-secret 16 | {{- end }} 17 | rules: 18 | {{- if .Values.useHostName }} 19 | - host: {{ .Values.host }} 20 | http: 21 | {{- else }} 22 | - http: 23 | {{- end }} 24 | paths: 25 | - path: / 26 | pathType: ImplementationSpecific 27 | backend: 28 | service: 29 | name: webspa 30 | port: 31 | number: 80 -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/webspa/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: webspa 5 | labels: 6 | app: eshop 7 | service: webspa 8 | spec: 9 | ports: 10 | - port: 80 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | service: webspa 16 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/webstatus/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: webstatus 5 | labels: 6 | app: eshop 7 | service: webstatus 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | service: webstatus 13 | template: 14 | metadata: 15 | labels: 16 | app: eshop 17 | service: webstatus 18 | spec: 19 | containers: 20 | - name: webstatus 21 | image: {{ .Values.registry }}/webstatus:linux-net6-coupon 22 | imagePullPolicy: {{ .Values.imagePullPolicy }} 23 | ports: 24 | - name: http 25 | containerPort: 80 26 | protocol: TCP 27 | envFrom: 28 | - configMapRef: 29 | name: webstatus-cm 30 | -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/webstatus/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: webstatus 5 | labels: 6 | app: eshop 7 | service: webstatus 8 | annotations: 9 | kubernetes.io/ingress.class: "nginx" 10 | spec: 11 | rules: 12 | {{- if .Values.useHostName }} 13 | - host: {{ .Values.host }} 14 | http: 15 | {{- else }} 16 | - http: 17 | {{- end }} 18 | paths: 19 | - path: /webstatus 20 | pathType: ImplementationSpecific 21 | backend: 22 | service: 23 | name: webstatus 24 | port: 25 | number: 80 -------------------------------------------------------------------------------- /deploy/k8s/helm-simple/webstatus/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: webstatus 5 | labels: 6 | app: eshop 7 | service: webstatus 8 | spec: 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | name: http 13 | selector: 14 | service: webstatus 15 | -------------------------------------------------------------------------------- /deploy/k8s/theme.sh: -------------------------------------------------------------------------------- 1 | # Text formatting 2 | declare red=`tput setaf 1` 3 | declare green=`tput setaf 2` 4 | declare yellow=`tput setaf 3` 5 | declare blue=`tput setaf 4` 6 | declare magenta=`tput setaf 5` 7 | declare cyan=`tput setaf 6` 8 | declare white=`tput setaf 7` 9 | declare defaultColor=`tput setaf 9` 10 | declare bold=`tput bold` 11 | declare plain=`tput sgr0` 12 | declare newline=$'\n' 13 | 14 | # Element styling 15 | declare azCliCommandStyle="${plain}${cyan}" 16 | declare defaultTextStyle="${plain}${white}" 17 | declare dotnetCliCommandStyle="${plain}${magenta}" 18 | declare genericCommandStyle="${plain}${yellow}" 19 | declare dotnetSayStyle="${magenta}${bold}" 20 | declare headingStyle="${white}${bold}" 21 | declare successStyle="${green}${bold}" 22 | declare warningStyle="${yellow}${bold}" 23 | declare errorStyle="${red}${bold}" 24 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers 8 | { 9 | [Route("")] 10 | public class HomeController : Controller 11 | { 12 | [HttpGet()] 13 | public IActionResult Index() 14 | { 15 | return new RedirectResult("~/swagger"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Models/AddBasketItemRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models 2 | { 3 | public class AddBasketItemRequest 4 | { 5 | public int CatalogItemId { get; set; } 6 | public string BasketId { get; set; } 7 | 8 | public int Quantity { get; set; } 9 | 10 | public AddBasketItemRequest() 11 | { 12 | Quantity = 1; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Models/CatalogItem.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models 2 | { 3 | public class CatalogItem 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public decimal Price { get; set; } 10 | 11 | public string PictureUri { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Models/CouponData.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models 2 | { 3 | public class CouponData 4 | { 5 | public int Discount { get; set; } 6 | 7 | public string Code { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Models/OrderItemData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models 7 | { 8 | public class OrderItemData 9 | { 10 | public int ProductId { get; set; } 11 | public string ProductName { get; set; } 12 | public decimal UnitPrice { get; set; } 13 | public decimal Discount { get; set; } 14 | public int Units { get; set; } 15 | public string PictureUrl { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Models/UpdateBasketRequest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models 7 | { 8 | public class UpdateBasketRequest 9 | { 10 | public string BuyerId { get; set; } 11 | 12 | public IEnumerable Items { get; set; } 13 | } 14 | 15 | public class UpdateBasketRequestItemData 16 | { 17 | public string Id { get; set; } // Basket id 18 | public int ProductId { get; set; } // Catalog item id 19 | public int Quantity { get; set; } // Quantity 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Services/IBasketService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 3 | 4 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services 5 | { 6 | public interface IBasketService 7 | { 8 | Task GetById(string id); 9 | 10 | Task UpdateAsync(BasketData currentBasket); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Services/ICatalogService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | 5 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services 6 | { 7 | public interface ICatalogService 8 | { 9 | Task GetCatalogItemAsync(int id); 10 | 11 | Task> GetCatalogItemsAsync(IEnumerable ids); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Services/ICouponService.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Http; 2 | using System.Threading.Tasks; 3 | 4 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services 5 | { 6 | public interface ICouponService 7 | { 8 | Task CheckCouponByCodeNumberAsync(string codeNumber); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Services/IOrderApiClient.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | using System.Threading.Tasks; 3 | 4 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services 5 | { 6 | public interface IOrderApiClient 7 | { 8 | Task GetOrderDraftFromBasketAsync(BasketData basket); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/Services/IOrderingService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | using System.Threading.Tasks; 3 | 4 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services 5 | { 6 | public interface IOrderingService 7 | { 8 | Task GetOrderDraftAsync(BasketData basketData); 9 | } 10 | } -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Debug" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Debug" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Serilog": { 3 | "SeqServerUrl": null, 4 | "LogstashgUrl": null, 5 | "MinimumLevel": { 6 | "Default": "Information", 7 | "Override": { 8 | "Microsoft": "Warning", 9 | "Microsoft.eShopOnContainers": "Information", 10 | "System": "Warning" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/appsettings.localhost.json: -------------------------------------------------------------------------------- 1 | { 2 | "urls": { 3 | "basket": "http://localhost:55105", 4 | "catalog": "http://localhost:55101", 5 | "orders": "http://localhost:55102", 6 | "identity": "http://localhost:55105", 7 | "grpcBasket": "http://localhost:5580", 8 | "grpcCatalog": "http://localhost:81", 9 | "grpcOrdering": "http://localhost:5581", 10 | "coupon": "http://localhost:5106" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/ApiGateways/Aggregators/Web.Shopping.HttpAggregator/values.dev.yaml: -------------------------------------------------------------------------------- 1 | ocelot: 2 | configPath: /app/configuration -------------------------------------------------------------------------------- /src/BuildingBlocks/EventBus/EventBus/Abstractions/IDynamicIntegrationEventHandler.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions 8 | { 9 | public interface IDynamicIntegrationEventHandler 10 | { 11 | Task Handle(dynamic eventData); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/BuildingBlocks/EventBus/EventBus/Abstractions/IEventBus.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System; 3 | 4 | namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions 5 | { 6 | public interface IEventBus 7 | { 8 | void Publish(IntegrationEvent @event); 9 | 10 | void Subscribe() 11 | where T : IntegrationEvent 12 | where TH : IIntegrationEventHandler; 13 | 14 | void SubscribeDynamic(string eventName) 15 | where TH : IDynamicIntegrationEventHandler; 16 | 17 | void UnsubscribeDynamic(string eventName) 18 | where TH : IDynamicIntegrationEventHandler; 19 | 20 | void Unsubscribe() 21 | where TH : IIntegrationEventHandler 22 | where T : IntegrationEvent; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/BuildingBlocks/EventBus/EventBus/Abstractions/IIntegrationEventHandler.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System.Threading.Tasks; 3 | 4 | namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions 5 | { 6 | public interface IIntegrationEventHandler : IIntegrationEventHandler 7 | where TIntegrationEvent: IntegrationEvent 8 | { 9 | Task Handle(TIntegrationEvent @event); 10 | } 11 | 12 | public interface IIntegrationEventHandler 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/BuildingBlocks/EventBus/EventBus/EventBus.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | Microsoft.eShopOnContainers.BuildingBlocks.EventBus 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/BuildingBlocks/EventBus/EventBus/Events/IntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | 4 | namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events 5 | { 6 | public class IntegrationEvent 7 | { 8 | public IntegrationEvent() 9 | { 10 | Id = Guid.NewGuid(); 11 | CreationDate = DateTime.UtcNow; 12 | } 13 | 14 | [JsonConstructor] 15 | public IntegrationEvent(Guid id, DateTime createDate) 16 | { 17 | Id = id; 18 | CreationDate = createDate; 19 | } 20 | 21 | [JsonProperty] 22 | public Guid Id { get; private set; } 23 | 24 | [JsonProperty] 25 | public DateTime CreationDate { get; private set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/BuildingBlocks/EventBus/EventBusRabbitMQ/IRabbitMQPersistentConnection.cs: -------------------------------------------------------------------------------- 1 | using RabbitMQ.Client; 2 | using System; 3 | 4 | namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ 5 | { 6 | public interface IRabbitMQPersistentConnection 7 | : IDisposable 8 | { 9 | bool IsConnected { get; } 10 | 11 | bool TryConnect(); 12 | 13 | IModel CreateModel(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus 2 | { 3 | using Microsoft.Azure.ServiceBus; 4 | using System; 5 | 6 | public interface IServiceBusPersisterConnection : IDisposable 7 | { 8 | ServiceBusConnectionStringBuilder ServiceBusConnectionStringBuilder { get; } 9 | 10 | ITopicClient CreateModel(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/BuildingBlocks/EventBus/IntegrationEventLogEF/EventStateEnum.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF 6 | { 7 | public enum EventStateEnum 8 | { 9 | NotPublished = 0, 10 | InProgress = 1, 11 | Published = 2, 12 | PublishedFailed = 3 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IIntegrationEventLogService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Storage; 2 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Data.Common; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | 9 | namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services 10 | { 11 | public interface IIntegrationEventLogService 12 | { 13 | Task> RetrieveEventLogsPendingToPublishAsync(Guid transactionId); 14 | Task SaveEventAsync(IntegrationEvent @event, IDbContextTransaction transaction); 15 | Task MarkEventAsPublishedAsync(Guid eventId); 16 | Task MarkEventAsInProgressAsync(Guid eventId); 17 | Task MarkEventAsFailedAsync(Guid eventId); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/BuildingBlocks/WebHost/WebHost.Customization/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:5399/", 7 | "sslPort": 44324 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "WebHost.Customization": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .git 3 | .gitignore 4 | .vs 5 | .vscode 6 | **/*.*proj.user 7 | **/azds.yaml 8 | **/bin 9 | **/charts 10 | **/Dockerfile 11 | **/Dockerfile.develop 12 | **/obj 13 | **/secrets.dev.yaml 14 | **/values.dev.yaml -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Auth/Client/popup.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/BasketSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Basket.API 2 | { 3 | public class BasketSettings 4 | { 5 | public string ConnectionString { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers 4 | { 5 | public class HomeController : Controller 6 | { 7 | // GET: // 8 | public IActionResult Index() 9 | { 10 | return new RedirectResult("~/swagger"); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/ActionResults/InternalServerErrorObjectResult.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Mvc; 3 | 4 | namespace Basket.API.Infrastructure.ActionResults 5 | { 6 | public class InternalServerErrorObjectResult : ObjectResult 7 | { 8 | public InternalServerErrorObjectResult(object error) 9 | : base(error) 10 | { 11 | StatusCode = StatusCodes.Status500InternalServerError; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/Exceptions/BasketDomainException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Basket.API.Infrastructure.Exceptions 4 | { 5 | /// 6 | /// Exception type for app exceptions 7 | /// 8 | public class BasketDomainException : Exception 9 | { 10 | public BasketDomainException() 11 | { } 12 | 13 | public BasketDomainException(string message) 14 | : base(message) 15 | { } 16 | 17 | public BasketDomainException(string message, Exception innerException) 18 | : base(message, innerException) 19 | { } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/Exceptions/FailingMiddlewareAppBuilderExtensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using System; 3 | 4 | namespace Basket.API.Infrastructure.Middlewares 5 | { 6 | public static class FailingMiddlewareAppBuilderExtensions 7 | { 8 | public static IApplicationBuilder UseFailingMiddleware(this IApplicationBuilder builder) 9 | { 10 | return UseFailingMiddleware(builder, null); 11 | } 12 | public static IApplicationBuilder UseFailingMiddleware(this IApplicationBuilder builder, Action action) 13 | { 14 | var options = new FailingOptions(); 15 | action?.Invoke(options); 16 | builder.UseMiddleware(options); 17 | return builder; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/Filters/JsonErrorResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Basket.API.Infrastructure.Filters 2 | { 3 | public class JsonErrorResponse 4 | { 5 | public string[] Messages { get; set; } 6 | 7 | public object DeveloperMessage { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Basket.API.Infrastructure.Middlewares 4 | { 5 | public class FailingOptions 6 | { 7 | public string ConfigPath = "/Failing"; 8 | public List EndpointPaths { get; set; } = new List(); 9 | 10 | public List NotFilteredPaths {get; set;} = new List(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingStartupFilter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using System; 4 | 5 | namespace Basket.API.Infrastructure.Middlewares 6 | { 7 | public class FailingStartupFilter : IStartupFilter 8 | { 9 | private readonly Action _options; 10 | public FailingStartupFilter(Action optionsAction) 11 | { 12 | _options = optionsAction; 13 | } 14 | 15 | public Action Configure(Action next) 16 | { 17 | return app => 18 | { 19 | app.UseFailingMiddleware(_options); 20 | next(app); 21 | }; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingWebHostBuilderExtensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.DependencyInjection; 3 | using System; 4 | 5 | namespace Basket.API.Infrastructure.Middlewares 6 | { 7 | public static class WebHostBuildertExtensions 8 | { 9 | public static IWebHostBuilder UseFailing(this IWebHostBuilder builder, Action options) 10 | { 11 | builder.ConfigureServices(services => 12 | { 13 | services.AddSingleton(new FailingStartupFilter(options)); 14 | }); 15 | return builder; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/IntegrationEvents/Events/OrderStartedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | 3 | namespace Basket.API.IntegrationEvents.Events 4 | { 5 | // Integration Events notes: 6 | // An Event is “something that has happened in the past”, therefore its name has to be 7 | // An Integration Event is an event that can cause side effects to other microsrvices, Bounded-Contexts or external systems. 8 | public class OrderStartedIntegrationEvent : IntegrationEvent 9 | { 10 | public string UserId { get; set; } 11 | 12 | public OrderStartedIntegrationEvent(string userId) 13 | => UserId = userId; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Model/CustomerBasket.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Basket.API.Model 4 | { 5 | public class CustomerBasket 6 | { 7 | public string BuyerId { get; set; } 8 | 9 | public List Items { get; set; } = new List(); 10 | 11 | public CustomerBasket() 12 | { 13 | 14 | } 15 | 16 | public CustomerBasket(string customerId) 17 | { 18 | BuyerId = customerId; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Model/IBasketRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | 4 | namespace Microsoft.eShopOnContainers.Services.Basket.API.Model 5 | { 6 | public interface IBasketRepository 7 | { 8 | Task GetBasketAsync(string customerId); 9 | IEnumerable GetUsers(); 10 | Task UpdateBasketAsync(CustomerBasket basket); 11 | Task DeleteBasketAsync(string id); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Proto/basket.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option csharp_namespace = "GrpcBasket"; 4 | 5 | package BasketApi; 6 | 7 | service Basket { 8 | rpc GetBasketById(BasketRequest) returns (CustomerBasketResponse) {} 9 | rpc UpdateBasket(CustomerBasketRequest) returns (CustomerBasketResponse) {} 10 | } 11 | 12 | message BasketRequest { 13 | string id = 1; 14 | } 15 | 16 | message CustomerBasketRequest { 17 | string buyerid = 1; 18 | repeated BasketItemResponse items = 2; 19 | } 20 | 21 | message CustomerBasketResponse { 22 | string buyerid = 1; 23 | repeated BasketItemResponse items = 2; 24 | } 25 | 26 | message BasketItemResponse { 27 | string id = 1; 28 | int32 productid = 2; 29 | string productname = 3; 30 | double unitprice = 4; 31 | double oldunitprice = 5; 32 | int32 quantity = 6; 33 | string pictureurl = 7; 34 | } 35 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/README.md: -------------------------------------------------------------------------------- 1 | # Containerized eShop - Basket Service 2 | Sample reference containerized application, cross-platform and microservices architecture. 3 | Powered by Microsoft 4 | 5 | Check procedures on how to get it started at the Wiki: 6 | https://github.com/dotnet/eShopOnContainers/wiki 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Services/IIdentityService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Basket.API.Services 2 | { 3 | public interface IIdentityService 4 | { 5 | string GetUserIdentity(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Services/IdentityService.cs: -------------------------------------------------------------------------------- 1 |  2 | using Microsoft.AspNetCore.Http; 3 | using System; 4 | 5 | namespace Microsoft.eShopOnContainers.Services.Basket.API.Services 6 | { 7 | public class IdentityService : IIdentityService 8 | { 9 | private IHttpContextAccessor _context; 10 | 11 | public IdentityService(IHttpContextAccessor context) 12 | { 13 | _context = context ?? throw new ArgumentNullException(nameof(context)); 14 | } 15 | 16 | public string GetUserIdentity() 17 | { 18 | return _context.HttpContext.User.FindFirst("sub").Value; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/TestHttpResponseTrailersFeature.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Http.Features; 3 | 4 | namespace Microsoft.eShopOnContainers.Services.Basket.API 5 | { 6 | internal class TestHttpResponseTrailersFeature : IHttpResponseTrailersFeature 7 | { 8 | public IHeaderDictionary Trailers { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Serilog": { 3 | "MinimumLevel": { 4 | "Default": "Debug", 5 | "Override": { 6 | "Microsoft": "Warning", 7 | "Microsoft.eShopOnContainers": "Debug", 8 | "System": "Warning" 9 | } 10 | } 11 | }, 12 | "IdentityUrlExternal": "http://localhost:5105", 13 | "IdentityUrl": "http://localhost:5105", 14 | "ConnectionString": "127.0.0.1", 15 | "AzureServiceBusEnabled": false, 16 | "EventBusConnection": "localhost" 17 | } -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Serilog": { 3 | "SeqServerUrl": null, 4 | "LogstashgUrl": null, 5 | "MinimumLevel": { 6 | "Default": "Information", 7 | "Override": { 8 | "Microsoft": "Warning", 9 | "Microsoft.eShopOnContainers": "Information", 10 | "System": "Warning" 11 | } 12 | } 13 | }, 14 | "Kestrel": { 15 | "EndpointDefaults": { 16 | "Protocols": "Http2" 17 | } 18 | }, 19 | "SubscriptionClientName": "Basket", 20 | "ApplicationInsights": { 21 | "InstrumentationKey": "" 22 | }, 23 | "EventBusRetryCount": 5, 24 | "UseVault": false, 25 | "Vault": { 26 | "Name": "eshop", 27 | "ClientId": "your-clien-id", 28 | "ClientSecret": "your-client-secret" 29 | } 30 | } -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/values.dev.yaml: -------------------------------------------------------------------------------- 1 | ingress: 2 | enabled: true 3 | tls: [] -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/CatalogSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API 2 | { 3 | public class CatalogSettings 4 | { 5 | public string PicBaseUrl { get;set;} 6 | 7 | public string EventBusConnection { get; set; } 8 | 9 | public bool UseCustomizationData { get; set; } 10 | public bool AzureStorageEnabled { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | 3 | // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 4 | 5 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers 6 | { 7 | public class HomeController : Controller 8 | { 9 | // GET: // 10 | public IActionResult Index() 11 | { 12 | return new RedirectResult("~/swagger"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model 7 | { 8 | public static class CatalogItemExtensions 9 | { 10 | public static void FillProductUrl(this CatalogItem item, string picBaseUrl, bool azureStorageEnabled) 11 | { 12 | if (item != null) 13 | { 14 | item.PictureUri = azureStorageEnabled 15 | ? picBaseUrl + item.PictureFileName 16 | : picBaseUrl.Replace("[0]", item.Id.ToString()); 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Infrastructure/ActionResults/InternalServerErrorObjectResult.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Mvc; 3 | 4 | namespace Catalog.API.Infrastructure.ActionResults 5 | { 6 | public class InternalServerErrorObjectResult : ObjectResult 7 | { 8 | public InternalServerErrorObjectResult(object error) 9 | : base(error) 10 | { 11 | StatusCode = StatusCodes.Status500InternalServerError; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/20170316120022_RefactoringEventBusNamespaces.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Microsoft.EntityFrameworkCore.Migrations; 4 | 5 | namespace Catalog.API.Infrastructure.Migrations 6 | { 7 | public partial class RefactoringEventBusNamespaces : Migration 8 | { 9 | protected override void Up(MigrationBuilder migrationBuilder) 10 | { 11 | 12 | } 13 | 14 | protected override void Down(MigrationBuilder migrationBuilder) 15 | { 16 | 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/20170530133114_AddPictureFileName.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Microsoft.EntityFrameworkCore.Migrations; 4 | 5 | namespace Catalog.API.Infrastructure.Migrations 6 | { 7 | public partial class AddPictureFile : Migration 8 | { 9 | protected override void Up(MigrationBuilder migrationBuilder) 10 | { 11 | migrationBuilder.RenameColumn( 12 | name: "PictureUri", 13 | table: "Catalog", 14 | newName: "PictureFileName"); 15 | } 16 | 17 | protected override void Down(MigrationBuilder migrationBuilder) 18 | { 19 | migrationBuilder.RenameColumn( 20 | name: "PictureFileName", 21 | table: "Catalog", 22 | newName: "PictureUri"); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Infrastructure/Exceptions/CatalogDomainException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Catalog.API.Infrastructure.Exceptions 4 | { 5 | /// 6 | /// Exception type for app exceptions 7 | /// 8 | public class CatalogDomainException : Exception 9 | { 10 | public CatalogDomainException() 11 | { } 12 | 13 | public CatalogDomainException(string message) 14 | : base(message) 15 | { } 16 | 17 | public CatalogDomainException(string message, Exception innerException) 18 | : base(message, innerException) 19 | { } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Infrastructure/IntegrationEventMigrations/20190507184807_AddTransactionId.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | namespace Catalog.API.Infrastructure.IntegrationEventMigrations 4 | { 5 | public partial class AddTransactionId : Migration 6 | { 7 | protected override void Up(MigrationBuilder migrationBuilder) 8 | { 9 | migrationBuilder.AddColumn( 10 | name: "TransactionId", 11 | table: "IntegrationEventLog", 12 | nullable: true); 13 | } 14 | 15 | protected override void Down(MigrationBuilder migrationBuilder) 16 | { 17 | migrationBuilder.DropColumn( 18 | name: "TransactionId", 19 | table: "IntegrationEventLog"); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Infrastructure/IntegrationEventMigrations/IntegrationEventLogContextDesignTimeFactory.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore.Design; 3 | using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF; 4 | 5 | namespace Catalog.API.Infrastructure.IntegrationEventMigrations 6 | { 7 | public class IntegrationEventLogContextDesignTimeFactory : IDesignTimeDbContextFactory 8 | { 9 | public IntegrationEventLogContext CreateDbContext(string[] args) 10 | { 11 | var optionsBuilder = new DbContextOptionsBuilder(); 12 | 13 | optionsBuilder.UseSqlServer(".", options => options.MigrationsAssembly(GetType().Assembly.GetName().Name)); 14 | 15 | return new IntegrationEventLogContext(optionsBuilder.Options); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/AnyFutureIntegrationEventHandler.cs.txt: -------------------------------------------------------------------------------- 1 |  2 | 3 | // To implement ProductPriceChangedEvent.cs here 4 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/IntegrationEvents/Events/OrderStatusChangedToPaidIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.Events 2 | { 3 | using System.Collections.Generic; 4 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 5 | 6 | public class OrderStatusChangedToPaidIntegrationEvent : IntegrationEvent 7 | { 8 | public int OrderId { get; } 9 | public IEnumerable OrderStockItems { get; } 10 | 11 | public OrderStatusChangedToPaidIntegrationEvent(int orderId, 12 | IEnumerable orderStockItems) 13 | { 14 | OrderId = orderId; 15 | OrderStockItems = orderStockItems; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/IntegrationEvents/Events/OrderStockConfirmedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.Events 2 | { 3 | using BuildingBlocks.EventBus.Events; 4 | 5 | public class OrderStockConfirmedIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | 9 | public OrderStockConfirmedIntegrationEvent(int orderId) => OrderId = orderId; 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/IntegrationEvents/ICatalogIntegrationEventService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System.Threading.Tasks; 3 | 4 | namespace Catalog.API.IntegrationEvents 5 | { 6 | public interface ICatalogIntegrationEventService 7 | { 8 | Task SaveEventAndCatalogContextChangesAsync(IntegrationEvent evt); 9 | Task PublishThroughEventBusAsync(IntegrationEvent evt); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Model/CatalogBrand.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model 2 | { 3 | public class CatalogBrand 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Brand { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Model/CatalogType.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model 2 | { 3 | public class CatalogType 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Type { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/1.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/10.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/11.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/12.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/13.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/14.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/2.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/3.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/4.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/5.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/6.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/7.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/8.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Pics/9.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/README.md: -------------------------------------------------------------------------------- 1 | # Containerized eShop - Catalog Service 2 | Sample reference containerized application, cross-platform and microservices architecture. 3 | Powered by Microsoft 4 | 5 | Check procedures on how to get it started at the Wiki: 6 | https://github.com/dotnet/eShopOnContainers/wiki 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Setup/CatalogBrands.csv: -------------------------------------------------------------------------------- 1 | CatalogBrand 2 | .NET 3 | Other 4 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Setup/CatalogItems.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Catalog/Catalog.API/Setup/CatalogItems.zip -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Setup/CatalogTypes.csv: -------------------------------------------------------------------------------- 1 | CatalogType 2 | Mug 3 | T-Shirt 4 | Pin -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/ViewModel/PaginatedItemsViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel 2 | { 3 | using System.Collections.Generic; 4 | 5 | 6 | public class PaginatedItemsViewModel where TEntity : class 7 | { 8 | public int PageIndex { get; private set; } 9 | 10 | public int PageSize { get; private set; } 11 | 12 | public long Count { get; private set; } 13 | 14 | public IEnumerable Data { get; private set; } 15 | 16 | public PaginatedItemsViewModel(int pageIndex, int pageSize, long count, IEnumerable data) 17 | { 18 | this.PageIndex = pageIndex; 19 | this.PageSize = pageSize; 20 | this.Count = count; 21 | this.Data = data; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word", 3 | "PicBaseUrl": "http://localhost:5101/api/v1/catalog/items/[0]/pic/", 4 | "Serilog": { 5 | "MinimumLevel": { 6 | "Default": "Debug", 7 | "Override": { 8 | "Microsoft": "Warning", 9 | "Microsoft.eShopOnContainers": "Debug", 10 | "System": "Warning" 11 | } 12 | } 13 | }, 14 | "EventBusConnection": "localhost" 15 | } -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "UseCustomizationData": false, 3 | "Serilog": { 4 | "SeqServerUrl": null, 5 | "LogstashgUrl": null, 6 | "MinimumLevel": { 7 | "Default": "Information", 8 | "Override": { 9 | "Microsoft": "Warning", 10 | "Microsoft.eShopOnContainers": "Information", 11 | "System": "Warning" 12 | } 13 | } 14 | }, 15 | "AzureServiceBusEnabled": false, 16 | "AzureStorageEnabled": false, 17 | "SubscriptionClientName": "Catalog", 18 | "ApplicationInsights": { 19 | "InstrumentationKey": "" 20 | }, 21 | "EventBusRetryCount": 5, 22 | "UseVault": false, 23 | "Vault": { 24 | "Name": "eshop", 25 | "ClientId": "your-clien-id", 26 | "ClientSecret": "your-client-secret" 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/values.dev.yaml: -------------------------------------------------------------------------------- 1 | ingress: 2 | enabled: true 3 | tls: [] -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/CouponSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Coupon.API 2 | { 3 | public class CouponSettings 4 | { 5 | public string ConnectionString { get; set; } 6 | 7 | public string CouponMongoDatabase { get; set; } 8 | 9 | public string EventBusConnection { get; set; } 10 | 11 | public bool UseCustomizationData { get; set; } 12 | 13 | public bool AzureStorageEnabled { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/Dtos/CouponDto.cs: -------------------------------------------------------------------------------- 1 | namespace Coupon.API.Dtos 2 | { 3 | public class CouponDto 4 | { 5 | public int Discount { get; set; } 6 | 7 | public string Code { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/Dtos/IMapper.cs: -------------------------------------------------------------------------------- 1 | namespace Coupon.API.Dtos 2 | { 3 | public interface IMapper 4 | { 5 | TResult Translate(TEntity entity); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/Dtos/Mapper.cs: -------------------------------------------------------------------------------- 1 | namespace Coupon.API.Dtos 2 | { 3 | using Coupon.API.Infrastructure.Models; 4 | 5 | public class Mapper : IMapper 6 | { 7 | public CouponDto Translate(Coupon entity) 8 | { 9 | return new CouponDto 10 | { 11 | Code = entity.Code, 12 | Discount = entity.Discount 13 | }; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/Filters/ValidateModelAttribute.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.Filters; 3 | 4 | namespace Coupon.API.Filters 5 | { 6 | public class ValidateModelAttribute : ActionFilterAttribute 7 | { 8 | public override void OnActionExecuting(ActionExecutingContext context) 9 | { 10 | if (!context.ModelState.IsValid) 11 | { 12 | context.Result = new BadRequestObjectResult(context.ModelState); 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/Infrastructure/Models/Coupon.cs: -------------------------------------------------------------------------------- 1 | using MongoDB.Bson; 2 | using MongoDB.Bson.Serialization.Attributes; 3 | 4 | namespace Coupon.API.Infrastructure.Models 5 | { 6 | public class Coupon 7 | { 8 | [BsonIgnoreIfDefault] 9 | [BsonRepresentation(BsonType.ObjectId)] 10 | public string Id { get; set; } 11 | 12 | public int Discount { get; set; } 13 | 14 | public string Code { get; set; } 15 | 16 | public bool Consumed { get; set; } 17 | 18 | public int OrderId { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/Infrastructure/Repositories/ICouponRepository.cs: -------------------------------------------------------------------------------- 1 | namespace Coupon.API.Infrastructure.Repositories 2 | { 3 | using System.Threading.Tasks; 4 | using Coupon.API.Infrastructure.Models; 5 | 6 | public interface ICouponRepository 7 | { 8 | Task FindCouponByCodeAsync(string code); 9 | 10 | Task UpdateCouponConsumedByCodeAsync(string code, int orderId); 11 | 12 | Task UpdateCouponReleasedByOrderIdAsync(int orderId); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/IntegrationEvents/Events/OrderCouponConfirmedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | 3 | namespace Coupon.API.IntegrationEvents.Events 4 | { 5 | public class OrderCouponConfirmedIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | 9 | public int Discount { get; } 10 | 11 | public OrderCouponConfirmedIntegrationEvent(int orderId, int discount) 12 | { 13 | OrderId = orderId; 14 | Discount = discount; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/IntegrationEvents/Events/OrderCouponRejectedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | 3 | namespace Coupon.API.IntegrationEvents.Events 4 | { 5 | public class OrderCouponRejectedIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | 9 | public string Code { get; } 10 | 11 | public OrderCouponRejectedIntegrationEvent(int orderId, string code) 12 | { 13 | OrderId = orderId; 14 | Code = code; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/IntegrationEvents/Events/OrderStatusChangedToAwaitingCouponValidationIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using Newtonsoft.Json; 3 | 4 | namespace Coupon.API.IntegrationEvents.Events 5 | { 6 | public class OrderStatusChangedToAwaitingCouponValidationIntegrationEvent : IntegrationEvent 7 | { 8 | [JsonProperty] 9 | public int OrderId { get; private set; } 10 | 11 | [JsonProperty] 12 | public string OrderStatus { get; private set; } 13 | 14 | [JsonProperty] 15 | public string BuyerName { get; private set; } 16 | 17 | [JsonProperty] 18 | public string Code { get; private set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/IntegrationEvents/Events/OrderStatusChangedToCancelledIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | 8 | namespace Coupon.API.IntegrationEvents.Events 9 | { 10 | public class OrderStatusChangedToCancelledIntegrationEvent : IntegrationEvent 11 | { 12 | [JsonProperty] 13 | public int OrderId { get; private set; } 14 | 15 | [JsonProperty] 16 | public string OrderStatus { get; private set; } 17 | 18 | [JsonProperty] 19 | public string BuyerName { get; private set; } 20 | 21 | [JsonProperty] 22 | public string DiscountCode { get; private set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionString": "mongodb://localhost:27017", 3 | "CouponMongoDatabase": "CouponDb", 4 | "Serilog": { 5 | "MinimumLevel": { 6 | "Default": "Debug", 7 | "Override": { 8 | "Microsoft": "Warning", 9 | "Microsoft.eShopOnContainers": "Debug", 10 | "System": "Warning" 11 | } 12 | } 13 | }, 14 | "IdentityUrlExternal": "http://localhost:5105", 15 | "IdentityUrl": "http://localhost:5105", 16 | "AzureServiceBusEnabled": false, 17 | "EventBusConnection": "localhost" 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Coupon/Coupon.API/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionString": null, 3 | "CouponMongoDatabase": "CouponDb", 4 | "UseCustomizationData": false, 5 | "Serilog": { 6 | "SeqServerUrl": null, 7 | "LogstashgUrl": null, 8 | "MinimumLevel": { 9 | "Default": "Information", 10 | "Override": { 11 | "Microsoft": "Warning", 12 | "Microsoft.eShopOnContainers": "Information", 13 | "System": "Warning" 14 | } 15 | } 16 | }, 17 | "SubscriptionClientName": "Coupon", 18 | "ApplicationInsights": { 19 | "InstrumentationKey": "" 20 | }, 21 | "EventBusRetryCount": 5, 22 | "UseVault": false, 23 | "Vault": { 24 | "Name": "eshop", 25 | "ClientId": "your-clien-id", 26 | "ClientSecret": "your-client-secret" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .git 3 | .gitignore 4 | .vs 5 | .vscode 6 | **/*.*proj.user 7 | **/azds.yaml 8 | **/bin 9 | **/charts 10 | **/Dockerfile 11 | **/Dockerfile.develop 12 | **/obj 13 | **/secrets.dev.yaml 14 | **/values.dev.yaml -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/AppSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API 2 | { 3 | public class AppSettings 4 | { 5 | public string MvcClient { get; set; } 6 | 7 | public bool UseCustomizationData { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Certificate/idsrv3test.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/Certificate/idsrv3test.pfx -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Devspaces/IdentityDevspacesBuilderExtensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.DependencyInjection; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Devspaces 8 | { 9 | static class IdentityDevspacesBuilderExtensions 10 | { 11 | public static IIdentityServerBuilder AddDevspacesIfNeeded(this IIdentityServerBuilder builder, bool useDevspaces) 12 | { 13 | if (useDevspaces) 14 | { 15 | builder.AddRedirectUriValidator(); 16 | } 17 | return builder; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentInputModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 4 | { 5 | public class ConsentInputModel 6 | { 7 | public string Button { get; set; } 8 | public IEnumerable ScopesConsented { get; set; } 9 | public bool RememberConsent { get; set; } 10 | public string ReturnUrl { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/ForgotPasswordViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 4 | { 5 | public class ForgotPasswordViewModel 6 | { 7 | [Required] 8 | [EmailAddress] 9 | public string Email { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/LoggedOutViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 2 | { 3 | public class LoggedOutViewModel 4 | { 5 | public string PostLogoutRedirectUri { get; set; } 6 | public string ClientName { get; set; } 7 | public string SignOutIframeUrl { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/LoginViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 4 | { 5 | public class LoginViewModel 6 | { 7 | [Required] 8 | [EmailAddress] 9 | public string Email { get; set; } 10 | 11 | [Required] 12 | [DataType(DataType.Password)] 13 | public string Password { get; set; } 14 | 15 | [Display(Name = "Remember me?")] 16 | public bool RememberMe { get; set; } 17 | public string ReturnUrl { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/LogoutViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 2 | { 3 | public class LogoutViewModel 4 | { 5 | public string LogoutId { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/SendCodeViewModel.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc.Rendering; 2 | using System.Collections.Generic; 3 | 4 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 5 | { 6 | public class SendCodeViewModel 7 | { 8 | public string SelectedProvider { get; set; } 9 | 10 | public ICollection Providers { get; set; } 11 | 12 | public string ReturnUrl { get; set; } 13 | 14 | public bool RememberMe { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/VerifyCodeViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 4 | { 5 | public class VerifyCodeViewModel 6 | { 7 | [Required] 8 | public string Provider { get; set; } 9 | 10 | [Required] 11 | public string Code { get; set; } 12 | 13 | public string ReturnUrl { get; set; } 14 | 15 | [Display(Name = "Remember this browser?")] 16 | public bool RememberBrowser { get; set; } 17 | 18 | [Display(Name = "Remember me?")] 19 | public bool RememberMe { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using IdentityServer4.Models; 6 | 7 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models 8 | { 9 | public class ErrorViewModel 10 | { 11 | public ErrorMessage Error { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ManageViewModels/AddPhoneNumberViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels 4 | { 5 | public class AddPhoneNumberViewModel 6 | { 7 | [Required] 8 | [Phone] 9 | [Display(Name = "Phone number")] 10 | public string PhoneNumber { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ManageViewModels/ConfigureTwoFactorViewModel.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc.Rendering; 2 | using System.Collections.Generic; 3 | 4 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels 5 | { 6 | public class ConfigureTwoFactorViewModel 7 | { 8 | public string SelectedProvider { get; set; } 9 | 10 | public ICollection Providers { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ManageViewModels/FactorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels 2 | { 3 | public class FactorViewModel 4 | { 5 | public string Purpose { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ManageViewModels/IndexViewModel.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity; 2 | using System.Collections.Generic; 3 | 4 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels 5 | { 6 | public class IndexViewModel 7 | { 8 | public bool HasPassword { get; set; } 9 | 10 | public IList Logins { get; set; } 11 | 12 | public string PhoneNumber { get; set; } 13 | 14 | public bool TwoFactor { get; set; } 15 | 16 | public bool BrowserRemembered { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ManageViewModels/SetPasswordViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels 4 | { 5 | public class SetPasswordViewModel 6 | { 7 | [Required] 8 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] 9 | [DataType(DataType.Password)] 10 | [Display(Name = "New password")] 11 | public string NewPassword { get; set; } 12 | 13 | [DataType(DataType.Password)] 14 | [Display(Name = "Confirm new password")] 15 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] 16 | public string ConfirmPassword { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ManageViewModels/VerifyPhoneNumberViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels 4 | { 5 | public class VerifyPhoneNumberViewModel 6 | { 7 | [Required] 8 | public string Code { get; set; } 9 | 10 | [Required] 11 | [Phone] 12 | [Display(Name = "Phone number")] 13 | public string PhoneNumber { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/README.md: -------------------------------------------------------------------------------- 1 | # Containerized eShop - Identity Service 2 | Sample reference containerized application, cross-platform and microservices architecture. 3 | Powered by Microsoft 4 | 5 | ## Overview 6 | This sample runs a microservices oriented application and a .net core Mvc application that consumes this services. You can find more information about how to set up docker in your machine in the global directory solution. 7 | 8 | ## Setup 9 | This service is a identity provider or STS (Security Token Service) currently implemented with IdentityServer 4 wrapping ASP.NET Identity underneath. 10 | 11 | Check procedures on how to get the sample app started at the Wiki: 12 | https://github.com/dotnet/eShopOnContainers/wiki 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Services/ILoginService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.AspNetCore.Authentication; 3 | 4 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Services 5 | { 6 | public interface ILoginService 7 | { 8 | Task ValidateCredentials(T user, string password); 9 | 10 | Task FindByUsername(string user); 11 | 12 | Task SignIn(T user); 13 | 14 | Task SignInAsync(T user, AuthenticationProperties properties, string authenticationMethod = null); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Services/IRedirectService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Services 2 | { 3 | public interface IRedirectService 4 | { 5 | string ExtractRedirectUriFromReturnUrl(string url); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Setup/Users.csv: -------------------------------------------------------------------------------- 1 | CardHolderName,CardNumber,CardType,City,Country,Email,Expiration,LastName,Name,PhoneNumber,UserName,ZipCode,State,Street,SecurityNumber,NormalizedEmail,NormalizedUserName,Password 2 | DemoUser,4012888888881881,1,Redmond,U.S.,demouser@microsoft.com,12/30,DemoLastName,DemoUser,1234567890,demouser@microsoft.com,98052,WA,15703 NE 61st Ct,535,DEMOUSER@MICROSOFT.COM,DEMOUSER@MICROSOFT.COM,Pass@word1 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Setup/images.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/Setup/images.zip -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/Account/LoggedOut.cshtml: -------------------------------------------------------------------------------- 1 | @model Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels.LoggedOutViewModel 2 | 3 | 22 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/Account/Logout.cshtml: -------------------------------------------------------------------------------- 1 | @model Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels.LogoutViewModel 2 | 3 |
4 | 7 | 8 |
9 |
10 |

Would you like to logout of IdentityServer?

11 |
12 | 13 |
14 |
15 | 16 |
17 |
18 |
19 |
20 |
21 |
-------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/Account/Redirecting.cshtml: -------------------------------------------------------------------------------- 1 | 
2 |
3 |

Redirecting...

4 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |
4 | Error 5 |
6 |
7 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 2 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/bundleconfig.json: -------------------------------------------------------------------------------- 1 | // Configure bundling and minification for the project. 2 | // More info at https://go.microsoft.com/fwlink/?LinkId=808241 3 | [ 4 | { 5 | "outputFileName": "wwwroot/css/site.min.css", 6 | // An array of relative input file paths. Globbing patterns supported 7 | "inputFiles": [ 8 | "wwwroot/css/**/*.css" 9 | ] 10 | }, 11 | { 12 | "outputFileName": "wwwroot/js/site.min.js", 13 | "inputFiles": [ 14 | "wwwroot/js/site.js" 15 | ], 16 | // Optionally specify minification options 17 | "minify": { 18 | "enabled": true, 19 | "renameLocals": true 20 | }, 21 | // Optinally generate .map file 22 | "sourceMap": false 23 | } 24 | ] 25 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/values.dev.yaml: -------------------------------------------------------------------------------- 1 | enableDevspaces: "true" 2 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/_references.js: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | /// 5 | /// 6 | /// 7 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/icon.jpg -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/icon.png -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/images/arrow-down.png -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/arrow-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/brand.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/images/brand.PNG -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/brand_dark.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/images/brand_dark.PNG -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/images/cart.png -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/images/header.jpg -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/logout.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/images/logout.PNG -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/main_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/images/main_banner.png -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/main_banner_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/images/main_banner_text.png -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/main_footer_text.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/images/main_footer_text.PNG -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/my_orders.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/images/my_orders.PNG -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Write your Javascript code. 2 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/js/site.min.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Services/Identity/Identity.API/wwwroot/js/site.min.js -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Commands/CancelOrderCommand.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Runtime.Serialization; 6 | using System.Threading.Tasks; 7 | 8 | namespace Ordering.API.Application.Commands 9 | { 10 | public class CancelOrderCommand : IRequest 11 | { 12 | 13 | public int OrderNumber { get; set; } 14 | 15 | public CancelOrderCommand() 16 | { 17 | 18 | } 19 | public CancelOrderCommand(int orderNumber) 20 | { 21 | OrderNumber = orderNumber; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Commands/CouponConfirmedCommand.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MediatR; 3 | 4 | namespace Ordering.API.Application.Commands 5 | { 6 | public class CouponConfirmedCommand : IRequest 7 | { 8 | 9 | [DataMember] 10 | public int OrderNumber { get; private set; } 11 | 12 | [DataMember] 13 | public int Discount { get; private set; } 14 | 15 | public CouponConfirmedCommand(int orderNumber, int discount) 16 | { 17 | OrderNumber = orderNumber; 18 | Discount = discount; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Commands/IdentifiedCommand.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | using System; 3 | 4 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands 5 | { 6 | public class IdentifiedCommand : IRequest 7 | where T : IRequest 8 | { 9 | public T Command { get; } 10 | public Guid Id { get; } 11 | public IdentifiedCommand(T command, Guid id) 12 | { 13 | Command = command; 14 | Id = id; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Commands/SetAwaitingStockValidationStatusCommand.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Runtime.Serialization; 6 | using System.Threading.Tasks; 7 | 8 | namespace Ordering.API.Application.Commands 9 | { 10 | public class SetAwaitingStockValidationStatusCommand : IRequest 11 | { 12 | 13 | [DataMember] 14 | public int OrderNumber { get; private set; } 15 | 16 | public SetAwaitingStockValidationStatusCommand(int orderNumber) 17 | { 18 | OrderNumber = orderNumber; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Commands/SetPaidOrderStatusCommand.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Runtime.Serialization; 6 | using System.Threading.Tasks; 7 | 8 | namespace Ordering.API.Application.Commands 9 | { 10 | public class SetPaidOrderStatusCommand : IRequest 11 | { 12 | 13 | [DataMember] 14 | public int OrderNumber { get; private set; } 15 | 16 | public SetPaidOrderStatusCommand(int orderNumber) 17 | { 18 | OrderNumber = orderNumber; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Commands/SetStockRejectedOrderStatusCommand.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Runtime.Serialization; 6 | using System.Threading.Tasks; 7 | 8 | namespace Ordering.API.Application.Commands 9 | { 10 | public class SetStockRejectedOrderStatusCommand : IRequest 11 | { 12 | 13 | [DataMember] 14 | public int OrderNumber { get; private set; } 15 | 16 | [DataMember] 17 | public List OrderStockItems { get; private set; } 18 | 19 | public SetStockRejectedOrderStatusCommand(int orderNumber, List orderStockItems) 20 | { 21 | OrderNumber = orderNumber; 22 | OrderStockItems = orderStockItems; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Commands/ShipOrderCommand.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Runtime.Serialization; 6 | using System.Threading.Tasks; 7 | 8 | namespace Ordering.API.Application.Commands 9 | { 10 | public class ShipOrderCommand : IRequest 11 | { 12 | 13 | [DataMember] 14 | public int OrderNumber { get; private set; } 15 | 16 | public ShipOrderCommand(int orderNumber) 17 | { 18 | OrderNumber = orderNumber; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Commands/StockConfirmedCommand.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MediatR; 3 | 4 | namespace Ordering.API.Application.Commands 5 | { 6 | public class StockConfirmedCommand : IRequest 7 | { 8 | 9 | [DataMember] 10 | public int OrderNumber { get; private set; } 11 | 12 | public StockConfirmedCommand(int orderNumber) 13 | { 14 | OrderNumber = orderNumber; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/DomainEventHandlers/OrderStartedEvent/SendEmailToCustomerWhenOrderStartedDomainEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | using MediatR; 7 | using Ordering.Domain.Events; 8 | 9 | namespace Ordering.API.Application.DomainEventHandlers.OrderStartedEvent 10 | { 11 | public class SendEmailToCustomerWhenOrderStartedDomainEventHandler 12 | //: IAsyncNotificationHandler 13 | { 14 | public SendEmailToCustomerWhenOrderStartedDomainEventHandler() 15 | { 16 | 17 | } 18 | 19 | //public async Task Handle(OrderStartedDomainEvent orderNotification) 20 | //{ 21 | // //TBD - Send email logic 22 | //} 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/GracePeriodConfirmedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.API.Application.IntegrationEvents.Events 2 | { 3 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 4 | 5 | public class GracePeriodConfirmedIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | 9 | public GracePeriodConfirmedIntegrationEvent(int orderId) => 10 | OrderId = orderId; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderCouponConfirmedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.API.Application.IntegrationEvents.Events 2 | { 3 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 4 | using Newtonsoft.Json; 5 | 6 | public class OrderCouponConfirmedIntegrationEvent : IntegrationEvent 7 | { 8 | [JsonProperty] 9 | public int OrderId { get; private set; } 10 | 11 | [JsonProperty] 12 | public int Discount { get; private set; } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderCouponRejectedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.API.Application.IntegrationEvents.Events 2 | { 3 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 4 | using Newtonsoft.Json; 5 | 6 | public class OrderCouponRejectedIntegrationEvent : IntegrationEvent 7 | { 8 | [JsonProperty] 9 | public int OrderId { get; private set; } 10 | 11 | [JsonProperty] 12 | public string Code { get; private set; } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderPaymentFailedIntegrationEvent .cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.API.Application.IntegrationEvents.Events 2 | { 3 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 4 | 5 | public class OrderPaymentFailedIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | 9 | public OrderPaymentFailedIntegrationEvent(int orderId) => OrderId = orderId; 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderPaymentSucceededIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.API.Application.IntegrationEvents.Events 2 | { 3 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 4 | 5 | public class OrderPaymentSucceededIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | 9 | public OrderPaymentSucceededIntegrationEvent(int orderId) => OrderId = orderId; 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderStartedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Ordering.API.Application.IntegrationEvents.Events 8 | { 9 | // Integration Events notes: 10 | // An Event is “something that has happened in the past”, therefore its name has to be 11 | // An Integration Event is an event that can cause side effects to other microsrvices, Bounded-Contexts or external systems. 12 | public class OrderStartedIntegrationEvent : IntegrationEvent 13 | { 14 | public string UserId { get; set; } 15 | 16 | public OrderStartedIntegrationEvent(string userId) 17 | => UserId = userId; 18 | } 19 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderStatusChangedToShippedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Ordering.API.Application.IntegrationEvents.Events 8 | { 9 | public class OrderStatusChangedToShippedIntegrationEvent : IntegrationEvent 10 | { 11 | public int OrderId { get; } 12 | public string OrderStatus { get; } 13 | public string BuyerName { get; } 14 | 15 | public OrderStatusChangedToShippedIntegrationEvent(int orderId, string orderStatus, string buyerName) 16 | { 17 | OrderId = orderId; 18 | OrderStatus = orderStatus; 19 | BuyerName = buyerName; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderStatusChangedToValidatedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.API.Application.IntegrationEvents.Events 2 | { 3 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 4 | 5 | public class OrderStatusChangedToValidatedIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | public string OrderStatus { get; } 9 | public string BuyerName { get; } 10 | public decimal Total { get; } 11 | 12 | public OrderStatusChangedToValidatedIntegrationEvent(int orderId, string orderStatus, string buyerName, decimal total) 13 | { 14 | OrderId = orderId; 15 | OrderStatus = orderStatus; 16 | BuyerName = buyerName; 17 | Total = total; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderStatusChangedTosubmittedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Ordering.API.Application.IntegrationEvents.Events 8 | { 9 | public class OrderStatusChangedToSubmittedIntegrationEvent : IntegrationEvent 10 | { 11 | public int OrderId { get; } 12 | public string OrderStatus { get; } 13 | public string BuyerName { get; } 14 | 15 | public OrderStatusChangedToSubmittedIntegrationEvent(int orderId, string orderStatus, string buyerName) 16 | { 17 | OrderId = orderId; 18 | OrderStatus = orderStatus; 19 | BuyerName = buyerName; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderStockConfirmedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.API.Application.IntegrationEvents.Events 2 | { 3 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 4 | 5 | public class OrderStockConfirmedIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | 9 | public OrderStockConfirmedIntegrationEvent(int orderId) => OrderId = orderId; 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/IntegrationEvents/IOrderingIntegrationEventService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System; 3 | using System.Threading.Tasks; 4 | 5 | namespace Ordering.API.Application.IntegrationEvents 6 | { 7 | public interface IOrderingIntegrationEventService 8 | { 9 | Task PublishEventsThroughEventBusAsync(Guid transactionId); 10 | Task AddAndSaveEventAsync(IntegrationEvent evt); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Models/BasketItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Ordering.API.Application.Models 7 | { 8 | public class BasketItem 9 | { 10 | public string Id { get; set; } 11 | public int ProductId { get; set; } 12 | public string ProductName { get; set; } 13 | public decimal UnitPrice { get; set; } 14 | public decimal OldUnitPrice { get; set; } 15 | public int Quantity { get; set; } 16 | public string PictureUrl { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Models/CustomerBasket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Ordering.API.Application.Models 7 | { 8 | public class CustomerBasket 9 | { 10 | public string BuyerId { get; set; } 11 | public List Items { get; set; } 12 | 13 | public CustomerBasket(string customerId) 14 | { 15 | BuyerId = customerId; 16 | Items = new List(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Queries/IOrderQueries.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Queries 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Threading.Tasks; 6 | 7 | public interface IOrderQueries 8 | { 9 | Task GetOrderAsync(int id); 10 | 11 | Task> GetOrdersFromUserAsync(Guid userId); 12 | 13 | Task> GetCardTypesAsync(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Validations/CancelOrderCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | using Microsoft.Extensions.Logging; 3 | using Ordering.API.Application.Commands; 4 | 5 | namespace Ordering.API.Application.Validations 6 | { 7 | public class CancelOrderCommandValidator : AbstractValidator 8 | { 9 | public CancelOrderCommandValidator(ILogger logger) 10 | { 11 | RuleFor(order => order.OrderNumber).NotEmpty().WithMessage("No orderId found"); 12 | 13 | logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Validations/IdentifiedCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands; 3 | using Microsoft.Extensions.Logging; 4 | 5 | namespace Ordering.API.Application.Validations 6 | { 7 | public class IdentifiedCommandValidator : AbstractValidator> 8 | { 9 | public IdentifiedCommandValidator(ILogger logger) 10 | { 11 | RuleFor(command => command.Id).NotEmpty(); 12 | 13 | logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Application/Validations/ShipOrderCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | using Microsoft.Extensions.Logging; 3 | using Ordering.API.Application.Commands; 4 | 5 | namespace Ordering.API.Application.Validations 6 | { 7 | public class ShipOrderCommandValidator : AbstractValidator 8 | { 9 | public ShipOrderCommandValidator(ILogger logger) 10 | { 11 | RuleFor(order => order.OrderNumber).NotEmpty().WithMessage("No orderId found"); 12 | 13 | logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.Controllers 4 | { 5 | public class HomeController : Controller 6 | { 7 | // GET: // 8 | public IActionResult Index() 9 | { 10 | return new RedirectResult("~/swagger"); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/ActionResults/InternalServerErrorObjectResult.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.ActionResults 2 | { 3 | using AspNetCore.Http; 4 | using Microsoft.AspNetCore.Mvc; 5 | 6 | public class InternalServerErrorObjectResult : ObjectResult 7 | { 8 | public InternalServerErrorObjectResult(object error) 9 | : base(error) 10 | { 11 | StatusCode = StatusCodes.Status500InternalServerError; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/IntegrationEventMigrations/20190507185219_AddTransactionId.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | namespace Ordering.API.Infrastructure.IntegrationEventMigrations 4 | { 5 | public partial class AddTransactionId : Migration 6 | { 7 | protected override void Up(MigrationBuilder migrationBuilder) 8 | { 9 | migrationBuilder.AddColumn( 10 | name: "TransactionId", 11 | table: "IntegrationEventLog", 12 | nullable: true); 13 | } 14 | 15 | protected override void Down(MigrationBuilder migrationBuilder) 16 | { 17 | migrationBuilder.DropColumn( 18 | name: "TransactionId", 19 | table: "IntegrationEventLog"); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/Migrations/20170403082405_NoBuyerPropertyInOrder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Microsoft.EntityFrameworkCore.Migrations; 4 | 5 | namespace Ordering.API.Migrations 6 | { 7 | public partial class NoBuyerPropertyInOrder : Migration 8 | { 9 | protected override void Up(MigrationBuilder migrationBuilder) 10 | { 11 | 12 | } 13 | 14 | protected override void Down(MigrationBuilder migrationBuilder) 15 | { 16 | 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/Migrations/20170405110939_NoPaymentMethodPropertyInOrder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Microsoft.EntityFrameworkCore.Migrations; 4 | 5 | namespace Ordering.API.Migrations 6 | { 7 | public partial class NoPaymentMethodPropertyInOrder : Migration 8 | { 9 | protected override void Up(MigrationBuilder migrationBuilder) 10 | { 11 | 12 | } 13 | 14 | protected override void Down(MigrationBuilder migrationBuilder) 15 | { 16 | 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/Migrations/20190808132242_Change_Relation_Of_Orders.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | namespace Ordering.API.Infrastructure.Migrations 4 | { 5 | public partial class Change_Relation_Of_Orders : Migration 6 | { 7 | protected override void Up(MigrationBuilder migrationBuilder) 8 | { 9 | } 10 | 11 | protected override void Down(MigrationBuilder migrationBuilder) 12 | { 13 | 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/Services/IIdentityService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Services 7 | { 8 | public interface IIdentityService 9 | { 10 | string GetUserIdentity(); 11 | 12 | string GetUserName(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/OrderingSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API 2 | { 3 | public class OrderingSettings 4 | { 5 | public bool UseCustomizationData { get; set; } 6 | 7 | public string ConnectionString { get; set; } 8 | 9 | public string EventBusConnection { get; set; } 10 | 11 | public int GracePeriodTime { get; set; } 12 | 13 | public int CheckUpdateTime { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/README.md: -------------------------------------------------------------------------------- 1 | # Containerized eShop - Orders Service 2 | Sample reference containerized application, cross-platform and microservices architecture. 3 | Powered by Microsoft 4 | 5 | Check procedures on how to get it started at the Wiki: 6 | https://github.com/dotnet/eShopOnContainers/wiki 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Setup/CardTypes.csv: -------------------------------------------------------------------------------- 1 | CardType 2 | Amex 3 | Visa 4 | MasterCard 5 | Capital One -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.BackgroundTasks/BackgroundTaskSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.BackgroundTasks 2 | { 3 | public class BackgroundTaskSettings 4 | { 5 | public string ConnectionString { get; set; } 6 | 7 | public string EventBusConnection { get; set; } 8 | 9 | public int GracePeriodTime { get; set; } 10 | 11 | public int CheckUpdateTime { get; set; } 12 | 13 | public string SubscriptionClientName { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.BackgroundTasks/Events/GracePeriodConfirmedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.BackgroundTasks.Events 2 | { 3 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 4 | 5 | public class GracePeriodConfirmedIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | 9 | public GracePeriodConfirmedIntegrationEvent(int orderId) => 10 | OrderId = orderId; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.BackgroundTasks/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Ordering.BackgroundTasks": { 4 | "commandName": "Project", 5 | "environmentVariables": { 6 | "DOTNET_ENVIRONMENT": "Development" 7 | } 8 | }, 9 | "Docker": { 10 | "commandName": "Docker" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.BackgroundTasks/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.BackgroundTasks/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;", 3 | "Serilog": { 4 | "SeqServerUrl": null, 5 | "LogstashgUrl": null, 6 | "MinimumLevel": { 7 | "Default": "Information", 8 | "Override": { 9 | "Microsoft": "Warning", 10 | "Microsoft.eShopOnContainers": "Information", 11 | "System": "Warning" 12 | } 13 | } 14 | }, 15 | "SubscriptionClientName": "BackgroundTasks", 16 | "GracePeriodTime": "1", 17 | "CheckUpdateTime": "1000", 18 | "ApplicationInsights": { 19 | "InstrumentationKey": "" 20 | }, 21 | "AzureServiceBusEnabled": false, 22 | "EventBusRetryCount": 5, 23 | "EventBusConnection": "", 24 | "EventBusUserName": "", 25 | "EventBusPassword": "" 26 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/AggregatesModel/BuyerAggregate/IBuyerRepository.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork; 2 | using System.Threading.Tasks; 3 | 4 | namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate 5 | { 6 | //This is just the RepositoryContracts or Interface defined at the Domain Layer 7 | //as requisite for the Buyer Aggregate 8 | 9 | public interface IBuyerRepository : IRepository 10 | { 11 | Buyer Add(Buyer buyer); 12 | Buyer Update(Buyer buyer); 13 | Task FindAsync(string BuyerIdentityGuid); 14 | Task FindByIdAsync(string id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/IOrderRepository.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork; 2 | using System.Threading.Tasks; 3 | 4 | namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate 5 | { 6 | //This is just the RepositoryContracts or Interface defined at the Domain Layer 7 | //as requisite for the Order Aggregate 8 | 9 | public interface IOrderRepository : IRepository 10 | { 11 | Order Add(Order order); 12 | 13 | void Update(Order order); 14 | 15 | Task GetAsync(int orderId); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/Events/BuyerPaymentMethodVerifiedDomainEvent.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate; 3 | 4 | namespace Ordering.Domain.Events 5 | { 6 | public class BuyerAndPaymentMethodVerifiedDomainEvent 7 | : INotification 8 | { 9 | public Buyer Buyer { get; private set; } 10 | public PaymentMethod Payment { get; private set; } 11 | public int OrderId { get; private set; } 12 | 13 | public BuyerAndPaymentMethodVerifiedDomainEvent(Buyer buyer, PaymentMethod payment, int orderId) 14 | { 15 | Buyer = buyer; 16 | Payment = payment; 17 | OrderId = orderId; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/Events/OrderCancelledDomainEvent.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace Ordering.Domain.Events 8 | { 9 | public class OrderCancelledDomainEvent : INotification 10 | { 11 | public Order Order { get; } 12 | 13 | public OrderCancelledDomainEvent(Order order) 14 | { 15 | Order = order; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/Events/OrderShippedDomainEvent.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; 3 | 4 | namespace Ordering.Domain.Events 5 | { 6 | public class OrderShippedDomainEvent : INotification 7 | { 8 | public Order Order { get; } 9 | 10 | public OrderShippedDomainEvent(Order order) 11 | { 12 | Order = order; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/Events/OrderStatusChangedToAwaitingCouponValidationDomainEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.Domain.Events 2 | { 3 | using MediatR; 4 | 5 | public class OrderStatusChangedToAwaitingCouponValidationDomainEvent : INotification 6 | { 7 | public int OrderId { get; } 8 | 9 | public string Code { get; set; } 10 | 11 | public OrderStatusChangedToAwaitingCouponValidationDomainEvent(int orderId, string code) 12 | { 13 | OrderId = orderId; 14 | Code = code; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/Events/OrderStatusChangedToAwaitingStockValidationDomainEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.Domain.Events 2 | { 3 | using MediatR; 4 | using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; 5 | using System.Collections.Generic; 6 | 7 | /// 8 | /// Event used when the grace period order is confirmed 9 | /// 10 | public class OrderStatusChangedToAwaitingStockValidationDomainEvent 11 | : INotification 12 | { 13 | public int OrderId { get; } 14 | public IEnumerable OrderItems { get; } 15 | 16 | public OrderStatusChangedToAwaitingStockValidationDomainEvent(int orderId, 17 | IEnumerable orderItems) 18 | { 19 | OrderId = orderId; 20 | OrderItems = orderItems; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/Events/OrderStatusChangedToPaidDomainEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.Domain.Events 2 | { 3 | using System.Collections.Generic; 4 | using MediatR; 5 | using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; 6 | 7 | /// 8 | /// Event used when the order is paid 9 | /// 10 | public class OrderStatusChangedToPaidDomainEvent 11 | : INotification 12 | { 13 | public int OrderId { get; } 14 | public IEnumerable OrderItems { get; } 15 | 16 | public OrderStatusChangedToPaidDomainEvent(int orderId, 17 | IEnumerable orderItems) 18 | { 19 | OrderId = orderId; 20 | OrderItems = orderItems; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/Events/OrderStatusChangedToValidatedDomainEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.Domain.Events 2 | { 3 | using MediatR; 4 | 5 | /// 6 | /// Event used when the order stock items are confirmed 7 | /// 8 | public class OrderStatusChangedToValidatedDomainEvent 9 | : INotification 10 | { 11 | public int OrderId { get; } 12 | 13 | public OrderStatusChangedToValidatedDomainEvent(int orderId) 14 | => OrderId = orderId; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/Exceptions/OrderingDomainException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Ordering.Domain.Exceptions 6 | { 7 | /// 8 | /// Exception type for domain exceptions 9 | /// 10 | public class OrderingDomainException : Exception 11 | { 12 | public OrderingDomainException() 13 | { } 14 | 15 | public OrderingDomainException(string message) 16 | : base(message) 17 | { } 18 | 19 | public OrderingDomainException(string message, Exception innerException) 20 | : base(message, innerException) 21 | { } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/SeedWork/IAggregateRoot.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork 2 | { 3 | 4 | public interface IAggregateRoot { } 5 | 6 | } 7 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/SeedWork/IRepository.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork 2 | { 3 | public interface IRepository where T : IAggregateRoot 4 | { 5 | IUnitOfWork UnitOfWork { get; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/SeedWork/IUnitOfWork.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | 5 | namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork 6 | { 7 | public interface IUnitOfWork : IDisposable 8 | { 9 | Task SaveChangesAsync(CancellationToken cancellationToken = default(CancellationToken)); 10 | Task SaveEntitiesAsync(CancellationToken cancellationToken = default(CancellationToken)); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Infrastructure/Idempotency/ClientRequest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency 4 | { 5 | public class ClientRequest 6 | { 7 | public Guid Id { get; set; } 8 | public string Name { get; set; } 9 | public DateTime Time { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Infrastructure/Idempotency/IRequestManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency 5 | { 6 | public interface IRequestManager 7 | { 8 | Task ExistAsync(Guid id); 9 | 10 | Task CreateRequestForCommandAsync(Guid id); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.SignalrHub/IntegrationEvents/Events/OrderStatusChangedToAwaitingCouponValidationIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using Newtonsoft.Json; 3 | 4 | namespace Ordering.SignalrHub.IntegrationEvents.Events 5 | { 6 | public class OrderStatusChangedToAwaitingCouponValidationIntegrationEvent : IntegrationEvent 7 | { 8 | [JsonProperty] 9 | public int OrderId { get; private set; } 10 | 11 | [JsonProperty] 12 | public string OrderStatus { get; private set; } 13 | 14 | [JsonProperty] 15 | public string BuyerName { get; private set; } 16 | 17 | [JsonProperty] 18 | public string Code { get; private set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.SignalrHub/IntegrationEvents/Events/OrderStatusChangedToAwaitingStockValidationIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System.Collections.Generic; 3 | 4 | namespace Ordering.SignalrHub.IntegrationEvents 5 | { 6 | public class OrderStatusChangedToAwaitingStockValidationIntegrationEvent : IntegrationEvent 7 | { 8 | public int OrderId { get; } 9 | public string OrderStatus { get; } 10 | public string BuyerName { get; } 11 | 12 | public OrderStatusChangedToAwaitingStockValidationIntegrationEvent(int orderId, string orderStatus, string buyerName) 13 | { 14 | OrderId = orderId; 15 | OrderStatus = orderStatus; 16 | BuyerName = buyerName; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.SignalrHub/IntegrationEvents/Events/OrderStatusChangedToCancelledIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Ordering.SignalrHub.IntegrationEvents.Events 8 | { 9 | public class OrderStatusChangedToCancelledIntegrationEvent : IntegrationEvent 10 | { 11 | public int OrderId { get; } 12 | public string OrderStatus { get; } 13 | public string BuyerName { get; } 14 | 15 | public OrderStatusChangedToCancelledIntegrationEvent(int orderId, string orderStatus, string buyerName) 16 | { 17 | OrderId = orderId; 18 | OrderStatus = orderStatus; 19 | BuyerName = buyerName; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.SignalrHub/IntegrationEvents/Events/OrderStatusChangedToPaidIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Ordering.SignalrHub.IntegrationEvents.Events 8 | { 9 | public class OrderStatusChangedToPaidIntegrationEvent : IntegrationEvent 10 | { 11 | public int OrderId { get; } 12 | public string OrderStatus { get; } 13 | public string BuyerName { get; } 14 | 15 | public OrderStatusChangedToPaidIntegrationEvent(int orderId, 16 | string orderStatus, string buyerName) 17 | { 18 | OrderId = orderId; 19 | OrderStatus = orderStatus; 20 | BuyerName = buyerName; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.SignalrHub/IntegrationEvents/Events/OrderStatusChangedToShippedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Ordering.SignalrHub.IntegrationEvents.Events 8 | { 9 | public class OrderStatusChangedToShippedIntegrationEvent : IntegrationEvent 10 | { 11 | public int OrderId { get; } 12 | public string OrderStatus { get; } 13 | public string BuyerName { get; } 14 | 15 | public OrderStatusChangedToShippedIntegrationEvent(int orderId, string orderStatus, string buyerName) 16 | { 17 | OrderId = orderId; 18 | OrderStatus = orderStatus; 19 | BuyerName = buyerName; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.SignalrHub/IntegrationEvents/Events/OrderStatusChangedToSubmittedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Ordering.SignalrHub.IntegrationEvents.Events 8 | { 9 | public class OrderStatusChangedToSubmittedIntegrationEvent : IntegrationEvent 10 | { 11 | public int OrderId { get; } 12 | public string OrderStatus { get; } 13 | public string BuyerName { get; } 14 | 15 | public OrderStatusChangedToSubmittedIntegrationEvent(int orderId, string orderStatus, string buyerName) 16 | { 17 | OrderId = orderId; 18 | OrderStatus = orderStatus; 19 | BuyerName = buyerName; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.SignalrHub/IntegrationEvents/Events/OrderStatusChangedToValidatedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 2 | 3 | namespace Ordering.SignalrHub.IntegrationEvents.Events 4 | { 5 | public class OrderStatusChangedToValidatedIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | public string OrderStatus { get; } 9 | public string BuyerName { get; } 10 | 11 | public OrderStatusChangedToValidatedIntegrationEvent(int orderId, string orderStatus, string buyerName) 12 | { 13 | OrderId = orderId; 14 | OrderStatus = orderStatus; 15 | BuyerName = buyerName; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.SignalrHub/NotificationHub.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Authorization; 2 | using Microsoft.AspNetCore.SignalR; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | 8 | namespace Ordering.SignalrHub 9 | { 10 | [Authorize] 11 | public class NotificationsHub : Hub 12 | { 13 | 14 | public override async Task OnConnectedAsync() 15 | { 16 | await Groups.AddToGroupAsync(Context.ConnectionId, Context.User.Identity.Name); 17 | await base.OnConnectedAsync(); 18 | } 19 | 20 | public override async Task OnDisconnectedAsync(Exception ex) 21 | { 22 | await Groups.RemoveFromGroupAsync(Context.ConnectionId, Context.User.Identity.Name); 23 | await base.OnDisconnectedAsync(ex); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.SignalrHub/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IdentityUrl": "http://localhost:5105", 3 | "Serilog": { 4 | "SeqServerUrl": null, 5 | "LogstashgUrl": null, 6 | "MinimumLevel": { 7 | "Default": "Information", 8 | "Override": { 9 | "Microsoft": "Warning", 10 | "Microsoft.eShopOnContainers": "Information", 11 | "System": "Warning" 12 | } 13 | } 14 | }, 15 | "AzureServiceBusEnabled": false, 16 | "SubscriptionClientName": "Ordering.signalrhub", 17 | "EventBusRetryCount": 5, 18 | "EventBusConnection": "localhost" 19 | } -------------------------------------------------------------------------------- /src/Services/Payment/Payment.API/IntegrationEvents/Events/OrderPaymentFailedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Payment.API.IntegrationEvents.Events 2 | { 3 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 4 | 5 | public class OrderPaymentFailedIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | 9 | public OrderPaymentFailedIntegrationEvent(int orderId) => OrderId = orderId; 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Payment/Payment.API/IntegrationEvents/Events/OrderPaymentSucceededIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Payment.API.IntegrationEvents.Events 2 | { 3 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 4 | 5 | public class OrderPaymentSucceededIntegrationEvent : IntegrationEvent 6 | { 7 | public int OrderId { get; } 8 | 9 | public OrderPaymentSucceededIntegrationEvent(int orderId) => OrderId = orderId; 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Payment/Payment.API/IntegrationEvents/Events/OrderStatusChangedToValidatedIntegrationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Payment.API.IntegrationEvents.Events 2 | { 3 | using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; 4 | using Newtonsoft.Json; 5 | 6 | public class OrderStatusChangedToValidatedIntegrationEvent : IntegrationEvent 7 | { 8 | [JsonProperty] 9 | public int OrderId { get; private set; } 10 | 11 | [JsonProperty] 12 | public decimal Total { get; private set; } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Services/Payment/Payment.API/PaymentSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Payment.API 2 | { 3 | public class PaymentSettings 4 | { 5 | public bool PaymentSucceeded { get; set; } 6 | public decimal? MaxOrderTotal { get; set; } 7 | public string EventBusConnection { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Payment/Payment.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Services/Payment/Payment.API/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Serilog": { 3 | "SeqServerUrl": null, 4 | "LogstashgUrl": null, 5 | "MinimumLevel": { 6 | "Default": "Information", 7 | "Override": { 8 | "Microsoft": "Warning", 9 | "Microsoft.eShopOnContainers": "Information", 10 | "System": "Warning" 11 | } 12 | } 13 | }, 14 | "PaymentSucceeded": true, 15 | "MaxOrderTotal": null, 16 | "AzureServiceBusEnabled": false, 17 | "SubscriptionClientName": "Payment", 18 | "ApplicationInsights": { 19 | "InstrumentationKey": "" 20 | }, 21 | "EventBusRetryCount": 5 22 | } 23 | -------------------------------------------------------------------------------- /src/Web/WebSPA/AppSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace eShopOnContainers.WebSPA 7 | { 8 | public class AppSettings 9 | { 10 | public string IdentityUrl { get; set; } 11 | public string BasketUrl { get; set; } 12 | public string MarketingUrl { get; set; } 13 | 14 | public string PurchaseUrl { get; set; } 15 | public string SignalrHubUrl { get; set; } 16 | 17 | public string ActivateCampaignDetailFunction { get; set; } 18 | public bool UseCustomizationData { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/.gitkeep -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Bold.eot -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Bold.ttf -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Bold.woff -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Bold.woff2 -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-ExtraLight.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-ExtraLight.eot -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-ExtraLight.ttf -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-ExtraLight.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-ExtraLight.woff -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-ExtraLight.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-ExtraLight.woff2 -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Light.eot -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Light.ttf -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Light.woff -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Light.woff2 -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Medium.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Medium.eot -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Medium.ttf -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Medium.woff -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Medium.woff2 -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Regular.eot -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Regular.ttf -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Regular.woff -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-Regular.woff2 -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-SemiBold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-SemiBold.eot -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-SemiBold.ttf -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-SemiBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-SemiBold.woff -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/fonts/Oswald-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/fonts/Oswald-SemiBold.woff2 -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/images/arrow-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/images/delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icons/24/X 5 | Created with Sketch. 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/images/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/assets/images/header.jpg -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/images/minus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icons/24/Minus 5 | Created with Sketch. 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/assets/images/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icons/24/Plus 5 | Created with Sketch. 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/favicon.ico -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/guid.ts: -------------------------------------------------------------------------------- 1 | export class Guid { 2 | static newGuid() { 3 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { 4 | var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); 5 | return v.toString(16); 6 | }); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | eShopOnContainers - SPA 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './modules/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule); 12 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | constructor() { } 6 | } 7 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/basket/basket-status/basket-status.component.html: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | 7 |
8 |
9 | {{badge}} 10 |
11 |
12 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/campaigns/campaigns-detail/campaigns-detail.component.html: -------------------------------------------------------------------------------- 1 | Back to campaigns 2 |
3 |
4 |
5 | {{campaign.name}} 6 |
7 |

{{campaign.name}}

8 |

{{campaign.description}}

9 |
10 | 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/campaigns/campaigns.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | 4 | import { SharedModule } from '../shared/shared.module'; 5 | import { CampaignsComponent } from './campaigns.component'; 6 | import { CampaignsDetailComponent } from './campaigns-detail/campaigns-detail.component'; 7 | import { CampaignsService } from './campaigns.service'; 8 | import { Header } from '../shared/components/header/header'; 9 | 10 | @NgModule({ 11 | imports: [BrowserModule, SharedModule], 12 | declarations: [CampaignsComponent, CampaignsDetailComponent], 13 | providers: [CampaignsService] 14 | }) 15 | export class CampaignsModule { } -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/catalog/catalog.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { CommonModule } from '@angular/common' 4 | import { SharedModule } from '../shared/shared.module'; 5 | import { CatalogComponent } from './catalog.component'; 6 | import { CatalogService } from './catalog.service'; 7 | import { Pager } from '../shared/components/pager/pager'; 8 | 9 | @NgModule({ 10 | imports: [BrowserModule, SharedModule, CommonModule], 11 | declarations: [CatalogComponent], 12 | providers: [CatalogService] 13 | }) 14 | export class CatalogModule { } 15 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/components/header/header.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/components/header/header.scss: -------------------------------------------------------------------------------- 1 | @import 'src/styles/variables'; 2 | 3 | .esh-header { 4 | $header-height: 4rem; 5 | 6 | background-color: $color-primary; 7 | height: $header-height; 8 | 9 | &-back { 10 | color: rgba($color-brightest, .5); 11 | line-height: $header-height; 12 | text-decoration: none; 13 | text-transform: uppercase; 14 | transition: color $animation-speed-default; 15 | 16 | &:hover { 17 | color: $color-brightest; 18 | transition: color $animation-speed-default; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/components/header/header.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'esh-header', 5 | templateUrl: './header.html', 6 | styleUrls: ['./header.scss'] 7 | }) 8 | export class Header { 9 | @Input() 10 | url: string; 11 | } 12 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/components/page-not-found/page-not-found.component.html: -------------------------------------------------------------------------------- 1 |

404!

2 | 3 |

Page you are looking for does not exists.

-------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/components/page-not-found/page-not-found.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Client/src/modules/shared/components/page-not-found/page-not-found.component.scss -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/components/page-not-found/page-not-found.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { PageNotFoundComponent } from './page-not-found.component'; 5 | 6 | describe('Component: PageNotFound', () => { 7 | it('should create an instance', () => { 8 | let component = new PageNotFoundComponent(); 9 | expect(component).toBeTruthy(); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/components/page-not-found/page-not-found.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'appc-page-not-found', 5 | templateUrl: './page-not-found.component.html', 6 | styleUrls: ['./page-not-found.component.scss'] 7 | }) 8 | export class PageNotFoundComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/components/pager/pager.scss: -------------------------------------------------------------------------------- 1 | @import 'src/styles/variables'; 2 | 3 | .esh-pager { 4 | 5 | &-wrapper { 6 | padding-top: 1rem; 7 | text-align: center; 8 | } 9 | 10 | &-item { 11 | font-size: $font-size-s; 12 | margin: 0 5vw; 13 | 14 | &.is-disabled { 15 | opacity: 0; 16 | pointer-events: none; 17 | } 18 | 19 | &--navigable { 20 | cursor: pointer; 21 | display: inline-block; 22 | 23 | &:hover { 24 | color: $color-secondary; 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/basket.model.ts: -------------------------------------------------------------------------------- 1 | import { IBasketItem } from './basketItem.model'; 2 | 3 | export interface IBasket { 4 | items: IBasketItem[]; 5 | buyerId: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/basketCheckout.model.ts: -------------------------------------------------------------------------------- 1 | export interface IBasketCheckout { 2 | city: number; 3 | street: string; 4 | state: string; 5 | country: number; 6 | zipcode: string; 7 | cardnumber: string; 8 | cardexpiration: Date; 9 | expiration: string; 10 | cardsecuritynumber: string; 11 | cardholdername: string; 12 | cardtypeid: number; 13 | buyer: string; 14 | ordernumber: string; 15 | coupon: string; 16 | total: number; 17 | discount: number; 18 | } -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/basketItem.model.ts: -------------------------------------------------------------------------------- 1 | export interface IBasketItem { 2 | id: string; 3 | productId: number; 4 | productName: string; 5 | unitPrice: number; 6 | oldUnitPrice: number; 7 | quantity: number; 8 | pictureUrl: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/campaign.model.ts: -------------------------------------------------------------------------------- 1 | import {ICampaignItem} from './campaignItem.model'; 2 | 3 | export interface ICampaign { 4 | data: ICampaignItem[]; 5 | pageIndex: number; 6 | pageSize: number; 7 | count: number; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/campaignItem.model.ts: -------------------------------------------------------------------------------- 1 | export interface ICampaignItem { 2 | id: number; 3 | name: string; 4 | description: string; 5 | from: Date; 6 | to: Date; 7 | pictureUri: string; 8 | detailsUri: string; 9 | } -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/catalog.model.ts: -------------------------------------------------------------------------------- 1 | import {ICatalogItem} from './catalogItem.model'; 2 | 3 | export interface ICatalog { 4 | pageIndex: number; 5 | data: ICatalogItem[]; 6 | pageSize: number; 7 | count: number; 8 | } 9 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/catalogBrand.model.ts: -------------------------------------------------------------------------------- 1 | export interface ICatalogBrand { 2 | id: number; 3 | brand: string; 4 | } -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/catalogItem.model.ts: -------------------------------------------------------------------------------- 1 | export interface ICatalogItem { 2 | id: number; 3 | name: string; 4 | description: string; 5 | price: number; 6 | pictureUri: string; 7 | catalogBrandId: number; 8 | catalogBrand: string; 9 | catalogTypeId: number; 10 | catalogType: string; 11 | units: number; 12 | } 13 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/catalogType.model.ts: -------------------------------------------------------------------------------- 1 | export interface ICatalogType { 2 | id: number; 3 | type: string; 4 | } -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/configuration.model.ts: -------------------------------------------------------------------------------- 1 | export interface IConfiguration { 2 | identityUrl: string, 3 | marketingUrl: string, 4 | purchaseUrl: string, 5 | signalrHubUrl: string, 6 | activateCampaignDetailFunction: boolean 7 | } -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/coupon.model.ts: -------------------------------------------------------------------------------- 1 | export interface ICoupon { 2 | discount: number; 3 | code: string; 4 | message: string 5 | } 6 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/identity.model.ts: -------------------------------------------------------------------------------- 1 | export interface IIdentity { 2 | 3 | } -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/order-detail.model.ts: -------------------------------------------------------------------------------- 1 | import {IOrderItem} from './orderItem.model'; 2 | 3 | export interface IOrderDetail { 4 | ordernumber: string; 5 | status: string; 6 | description: string; 7 | street: string; 8 | date: Date; 9 | city: number; 10 | state: string; 11 | zipcode: string; 12 | country: number; 13 | subtotal: number; 14 | coupon: string; 15 | discount: number; 16 | total: number; 17 | orderitems: IOrderItem[]; 18 | } 19 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/order.model.ts: -------------------------------------------------------------------------------- 1 | import {IOrderItem} from './orderItem.model'; 2 | 3 | export interface IOrder { 4 | city: number; 5 | street: string; 6 | state: string; 7 | country: number; 8 | zipcode: string; 9 | cardnumber: string; 10 | cardexpiration: Date; 11 | expiration: string; 12 | cardsecuritynumber: string; 13 | cardholdername: string; 14 | cardtypeid: number; 15 | buyer: string; 16 | ordernumber: string; 17 | subtotal: number, 18 | coupon: string; 19 | discount: number; 20 | total: number; 21 | orderItems: IOrderItem[]; 22 | } 23 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/orderItem.model.ts: -------------------------------------------------------------------------------- 1 | export interface IOrderItem { 2 | pictureurl: string; 3 | productname: string; 4 | unitprice: number; 5 | units: number; 6 | productId: number; 7 | } 8 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/models/pager.model.ts: -------------------------------------------------------------------------------- 1 | export interface IPager { 2 | itemsPage: number; 3 | totalItems: number; 4 | actualPage: number; 5 | totalPages: number; 6 | items: number; 7 | } 8 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/pipes/uppercase.pipe.spec.ts: -------------------------------------------------------------------------------- 1 | import { UppercasePipe } from './uppercase.pipe'; 2 | 3 | describe('Pipe appfUppercase', () => { 4 | let pipe: UppercasePipe; 5 | 6 | beforeEach(() => { 7 | pipe = new UppercasePipe(); 8 | }); 9 | 10 | it('transforms "abc" to "ABC"', () => { 11 | expect(pipe.transform('abc')).toEqual('ABC'); 12 | }); 13 | 14 | it('transforms "abc def" to "ABC DEF"', () => { 15 | expect(pipe.transform('abc def')).toEqual('ABC DEF'); 16 | }); 17 | 18 | it('leaves "ABC DEF" unchanged', () => { 19 | expect(pipe.transform('ABC DEF')).toEqual('ABC DEF'); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/pipes/uppercase.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | @Pipe({ 4 | name: 'appfUppercase' 5 | }) 6 | export class UppercasePipe implements PipeTransform { 7 | transform(value: string) { 8 | return value.toUpperCase(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/services/notification.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable() 4 | export class NotificationService { 5 | 6 | printSuccessMessage(message: string) { 7 | console.log(message); 8 | } 9 | 10 | printErrorMessage(message: string) { 11 | console.error(message); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/modules/shared/services/storage.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable() 4 | export class StorageService { 5 | private storage: any; 6 | 7 | constructor() { 8 | this.storage = sessionStorage; // localStorage; 9 | } 10 | 11 | public retrieve(key: string): any { 12 | let item = this.storage.getItem(key); 13 | 14 | if (item && item !== 'undefined') { 15 | return JSON.parse(this.storage.getItem(key)); 16 | } 17 | 18 | return; 19 | } 20 | 21 | public store(key: string, value: any) { 22 | this.storage.setItem(key, JSON.stringify(value)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/styles/_bootstrap-overrides.scss: -------------------------------------------------------------------------------- 1 | @import 'variables'; 2 | 3 | $primary: $color-primary; 4 | $secondary: $color-secondary; 5 | $warning: $color-primary; 6 | 7 | //button 8 | $btn-border-radius: 0; 9 | $btn-white-space: nowrap; 10 | 11 | //form 12 | $input-border-radius: 0; 13 | $input-box-shadow: none; 14 | $input-border-color: $color-secondary; -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/styles/_form.scss: -------------------------------------------------------------------------------- 1 | .form { 2 | &-control { 3 | border-width: 2px; 4 | border-color: $color-secondary; 5 | font-size: $font-size-m; 6 | font-weight: $font-weight-semilight; 7 | 8 | &:hover { 9 | border-color: $color-secondary-brighter; 10 | } 11 | 12 | &:focus { 13 | border-color: $color-primary; 14 | box-shadow: unset; 15 | } 16 | 17 | &:visited { 18 | text-decoration: unset; 19 | } 20 | } 21 | } 22 | 23 | label { 24 | font-size: $font-size-s; 25 | margin-bottom: 0.2rem; 26 | } -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "baseUrl": "", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "baseUrl": "", 8 | "types": [ 9 | "jasmine", 10 | "node" 11 | ] 12 | }, 13 | "files": [ 14 | "test.ts", 15 | "polyfills.ts" 16 | ], 17 | "include": [ 18 | "**/*.spec.ts", 19 | "**/*.d.ts" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "baseUrl": "src", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2016", 17 | "dom" 18 | ], 19 | "module": "es2015" 20 | }, 21 | } -------------------------------------------------------------------------------- /src/Web/WebSPA/Client/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "mode": "modules", 3 | "out": "doc", 4 | "theme": "default", 5 | "ignoreCompilerErrors": "true", 6 | "experimentalDecorators": "true", 7 | "emitDecoratorMetadata": "true", 8 | "target": "ES5", 9 | "moduleResolution": "node", 10 | "preserveConstEnums": "true", 11 | "stripInternal": "true", 12 | "suppressExcessPropertyErrors": "true", 13 | "suppressImplicitAnyIndexErrors": "true", 14 | "module": "commonjs" 15 | } 16 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Server/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 2 | 3 | using Microsoft.AspNetCore.Hosting; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.Options; 6 | using eShopOnContainers.WebSPA; 7 | 8 | namespace eShopConContainers.WebSPA.Server.Controllers 9 | { 10 | public class HomeController : Controller 11 | { 12 | private readonly IWebHostEnvironment _env; 13 | private readonly IOptionsSnapshot _settings; 14 | 15 | public HomeController(IWebHostEnvironment env, IOptionsSnapshot settings) 16 | { 17 | _env = env; 18 | _settings = settings; 19 | } 20 | public IActionResult Configuration() 21 | { 22 | return Json(_settings.Value); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Web/WebSPA/Setup/images.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebSPA/Setup/images.zip -------------------------------------------------------------------------------- /src/Web/WebSPA/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IdentityUrl": "http://host.docker.internal:5105", 3 | "MarketingUrl": "", 4 | "CallBackUrl": "http://host.docker.internal:5104/", 5 | "BasketUrl" : "http://host.docker.internal:5103", 6 | "PurchaseUrl": "http://host.docker.internal:5202", 7 | "PurchaseUrlHC": "http://host.docker.internal:5202/hc", 8 | "MarketingUrlHC": "", 9 | "IdentityUrlHC": "http://host.docker.internal:5105/hc", 10 | "SignalrHubUrl": "http://host.docker.internal:5112", 11 | "UseCustomizationData": true, 12 | "IsClusterEnv": "False", 13 | "ActivateCampaignDetailFunction": false, 14 | "Logging": { 15 | "IncludeScopes": false, 16 | "LogLevel": { 17 | "Default": "Debug", 18 | "System": "Information", 19 | "Microsoft": "Information" 20 | } 21 | }, 22 | "ApplicationInsights": { 23 | "InstrumentationKey": "" 24 | } 25 | } -------------------------------------------------------------------------------- /src/Web/WebSPA/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Web/WebStatus/Dockerfile.acr: -------------------------------------------------------------------------------- 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:6.0 AS base 4 | WORKDIR /app 5 | EXPOSE 80 6 | 7 | FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build 8 | WORKDIR /src 9 | 10 | COPY ["src/Web/WebStatus/WebStatus.csproj", "src/Web/WebStatus/"] 11 | RUN dotnet restore "src/Web/WebStatus/WebStatus.csproj" 12 | 13 | COPY . . 14 | WORKDIR "/src/src/Web/WebStatus" 15 | # RUN dotnet build "WebStatus.csproj" -c Release -o /app/build 16 | 17 | FROM build AS publish 18 | RUN dotnet publish --no-restore "WebStatus.csproj" -c Release -o /app/publish 19 | 20 | FROM base AS final 21 | WORKDIR /app 22 | COPY --from=publish /app/publish . 23 | ENTRYPOINT ["dotnet", "WebStatus.dll"] -------------------------------------------------------------------------------- /src/Web/WebStatus/Views/Home/Config.cshtml: -------------------------------------------------------------------------------- 1 | @model Dictionary 2 | 3 | @{ 4 | ViewData["Title"] = "WebStatus Configuration"; 5 | } 6 | 7 |

Configuration Values

8 | 9 | 10 | @foreach (var item in Model) 11 | { 12 | 13 | 14 | 15 | 16 | } 17 |
@item.Key@item.Value
18 | -------------------------------------------------------------------------------- /src/Web/WebStatus/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Serilog": { 3 | "MinimumLevel": { 4 | "Default": "Debug" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Web/WebStatus/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Serilog": { 3 | "SeqServerUrl": null, 4 | "LogstashgUrl": null, 5 | "MinimumLevel": { 6 | "Default": "Information", 7 | "Override": { 8 | "Microsoft": "Warning", 9 | "Microsoft.eShopOnContainers": "Information", 10 | "System": "Warning" 11 | } 12 | } 13 | }, 14 | "Webhooks": [ 15 | { 16 | "Name": "", 17 | "Uri": "", 18 | "Payload": "", 19 | "RestoredPayload": "" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /src/Web/WebStatus/bundleconfig.json: -------------------------------------------------------------------------------- 1 | // Configure bundling and minification for the project. 2 | // More info at https://go.microsoft.com/fwlink/?LinkId=808241 3 | [ 4 | { 5 | "outputFileName": "wwwroot/css/site.min.css", 6 | // An array of relative input file paths. Globbing patterns supported 7 | "inputFiles": [ 8 | "wwwroot/css/site.css" 9 | ] 10 | }, 11 | { 12 | "outputFileName": "wwwroot/js/site.min.js", 13 | "inputFiles": [ 14 | "wwwroot/js/site.js" 15 | ], 16 | // Optionally specify minification options 17 | "minify": { 18 | "enabled": true, 19 | "renameLocals": true 20 | }, 21 | // Optionally generate .map file 22 | "sourceMap": false 23 | } 24 | ] 25 | -------------------------------------------------------------------------------- /src/Web/WebStatus/libman.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "defaultProvider": "cdnjs", 4 | "libraries": [ 5 | { 6 | "library": "jquery@3.4.1", 7 | "destination": "wwwroot/lib/jquery/" 8 | }, 9 | { 10 | "provider": "unpkg", 11 | "library": "bootstrap@4.1.3", 12 | "files": [ 13 | "dist/css/bootstrap.css", 14 | "dist/css/bootstrap.css.map", 15 | "dist/css/bootstrap.min.css", 16 | "dist/css/bootstrap.min.css.map", 17 | "dist/js/bootstrap.js", 18 | "dist/js/bootstrap.min.js" 19 | ], 20 | "destination": "wwwroot/lib/bootstrap/" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /src/Web/WebStatus/wwwroot/css/site.min.css: -------------------------------------------------------------------------------- 1 | body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}input,select,textarea{max-width:280px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}@media screen and (max-width:767px){.carousel-caption{display:none}} -------------------------------------------------------------------------------- /src/Web/WebStatus/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftDocs/mslearn-microservices-devops-aspnet-core/1b85024c5c7bd9aa20524aefe0dc40d85336bb70/src/Web/WebStatus/wwwroot/favicon.ico -------------------------------------------------------------------------------- /tests/Services/Coupon/Coupon.API.Tests/Controllers/CouponControllerTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | namespace Coupon.API.Tests 4 | { 5 | public class CouponControllerTests 6 | { 7 | [Fact] 8 | public void Test1() 9 | { 10 | Assert.True(false); 11 | } 12 | } 13 | } 14 | --------------------------------------------------------------------------------