# dotnet-architecture/eshopmodernizing architecture

> Architecture diagram of the GitHub repository dotnet-architecture/eshopmodernizing, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dotnet-architecture/eshopmodernizing
- Repository: https://github.com/dotnet-architecture/eshopmodernizing

## Overview

#### Purpose and Entry Points
This is a lift-and-shift modernization reference for three .NET Framework eShop catalog-management applications: ASP.NET MVC, ASP.NET Web Forms, and a WinForms desktop client backed by WCF. Legacy and container-ready variants coexist. The primary local entry point is `build.cmd`, followed by root `docker-compose.yml`; it builds/runs the MVC, WebForms, WCF, and SQL Server containers.

#### Application Variants
The repository preserves baseline legacy implementations alongside modernized equivalents:
- MVC: `eShopLegacyMVCSolution/src/eShopLegacyMVC/Global.asax.cs`; modernized container app: `eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile`.
- Web Forms: `eShopLegacyWebFormsSolution/src/eShopLegacyWebForms/Global.asax.cs`; modernized version: `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Dockerfile`.
- N-tier desktop/service: `eShopLegacyNTier/src/eShopWinForms/Program.cs`, `eShopModernizedNTier/src/eShopWCFService/CatalogService.svc`.

#### Catalog Application Layer
MVC and WebForms expose CRUD workflows for catalog items, brands, and types. HTTP/page requests enter framework lifecycle and route into controllers or Web Forms code-behind, then call catalog services and render views/pages.
- MVC control boundary: `eShopModernizedMVCSolution/src/eShopModernizedMVC/Controllers/CatalogController.cs`, `eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ICatalogService.cs`.
- Web Forms boundary: `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Catalog/Edit.aspx.cs`, `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Services/CatalogService.cs`.
- The WinForms client uses a generated WCF service reference: `eShopModernizedNTier/src/eShopWinForms/Connected Services/eShopServiceReference/Reference.cs`.

#### Persistence and Initialization
Each web/service implementation has an Entity Framework-style catalog model and database context. Catalog data is initialized from packaged CSV data; database-specific HiLo sequence scripts support identifier allocation. A mock service provides an explicit no-database execution mode.
- Modernized MVC: `eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs`, `eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/Infrastructure/CatalogDBInitializer.cs`.
- Modernized WebForms: `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Models/Infrastructure/PreconfiguredData.cs`.
- WCF data/service boundary: `eShopModernizedNTier/src/eShopWCFService/EntityModel.cs`, `eShopModernizedNTier/src/eShopWCFService/CatalogService.svc.cs`.

#### Modernization Boundaries
Modernized MVC and WebForms add container packaging, authentication middleware, telemetry, optional Azure Key Vault configuration, Azure SQL token acquisition, and optional Azure Blob-based image storage. These are infrastructure integrations around largely retained application code.
- MVC: `eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs`, `eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ImageAzureStorage.cs`.
- WebForms: `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/App_Start/OptionalKeyVaultConfigurationBuilder.cs`, `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Middleware/AuthenticationMiddleware.cs`.

#### Container Runtime and Local Topology
Docker Compose coordinates Windows containers. Root orchestration runs all three frontends/services plus SQL Server; solution-specific Compose files allow individual stacks and overrides, including mock versus SQL modes. Service traffic is browser-to-MVC/WebForms or WinForms-to-WCF; application services persist to SQL Server and may store images in Azure Storage.
- `docker-compose.yml`
- `eShopModernizedMVCSolution/docker-compose.yml`
- `eShopModernizedNTier/docker-compose.yml`

#### Deployment Targets
The same container artifacts can be deployed to Azure Container Instances, Windows VMs, Kubernetes/AKS, or Service Fabric. Kubernetes manifests define MVC/WebForms/WCF/SQL deployment combinations; Service Fabric application packages define container services and cloud/local parameters. Azure Resource Manager assets provision ACI and Service Fabric environments.
- `ACI/aci.json`
- `Kubernetes/eShopModernizedMVC-K8s/ServiceDeployments/eshop-modernized-mvc-k8s-services-deployment.yml`
- `ServiceFabric/eShopModernizedMVC-ServiceFabricApp/ApplicationPackageRoot/ApplicationManifest.xml`

Main entry points: [`eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile`](https://github.com/dotnet-architecture/eshopmodernizing/tree/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile) (MVC container image), [`docker-compose.yml`](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/docker-compose.yml) (Root Compose topology), [`eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ICatalogService.cs`](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ICatalogService.cs) (MVC catalog service), [`eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs`](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs) (MVC catalog context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_legacy["Legacy baselines"]
  node_legacy_mvc["Legacy MVC app<br/>ASP.NET MVC<br/>[Global.asax.cs]"]
  node_legacy_webforms["Legacy Web Forms app<br/>ASP.NET Web Forms<br/>[Global.asax.cs]"]
  node_legacy_winforms["Legacy WinForms client<br/>[Program.cs]"]
end

subgraph group_modern["Modernized catalog apps"]
  node_mvc_container["MVC container image<br/>Dockerfile"]
  node_mvc_startup["MVC infrastructure<br/>startup pipeline<br/>[Startup.cs]"]
  node_mvc_controller["MVC catalog controller<br/>HTTP controller"]
  node_mvc_catalog_service["MVC catalog service<br/>service contract<br/>[ICatalogService.cs]"]
  node_mvc_catalog_db[("MVC catalog context<br/>EF context")]
  node_mvc_initializer["MVC catalog initializer<br/>data initializer"]
  node_webforms_container["Web Forms container image<br/>Dockerfile"]
  node_webforms_catalog_page["Web Forms catalog page<br/>code-behind<br/>[Edit.aspx.cs]"]
  node_webforms_catalog_service["Web Forms catalog service<br/>application service<br/>[CatalogService.cs]"]
  node_webforms_seed_data["Web Forms seed data<br/>preconfigured data"]
  node_webforms_auth["Web Forms authentication<br/>middleware"]
  node_winforms_client["Modernized WinForms client<br/>WCF client proxy<br/>[Reference.cs]"]
  node_wcf_service["WCF catalog service<br/>WCF service"]
  node_wcf_model[("WCF entity model<br/>data model<br/>[EntityModel.cs]")]
end

subgraph group_runtime["Runtime and deployment"]
  node_build["Local build entry<br/>build script<br/>[build.cmd]"]
  node_root_compose{{"Root Compose topology<br/>Docker Compose<br/>[docker-compose.yml]"}}
  node_sql_server[("SQL Server<br/>database")]
  node_azure_blob[("Azure Blob Storage<br/>image storage")]
  node_kubernetes["Kubernetes deployments<br/>deployment manifests"]
  node_service_fabric["Service Fabric package<br/>deployment package"]
  node_aci["Azure Container Instances<br/>ARM template<br/>[aci.json]"]
end

node_build -->|"invokes"| node_root_compose
node_root_compose -->|"runs"| node_mvc_container
node_root_compose -->|"runs"| node_webforms_container
node_root_compose -->|"hosts"| node_wcf_service
node_root_compose -->|"runs"| node_sql_server
node_mvc_container -->|"packages"| node_mvc_startup
node_mvc_startup -->|"routes requests to"| node_mvc_controller
node_mvc_controller -->|"uses"| node_mvc_catalog_service
node_mvc_catalog_service -->|"persists through"| node_mvc_catalog_db
node_mvc_initializer -->|"seeds"| node_mvc_catalog_db
node_mvc_catalog_db -->|"stores catalog data"| node_sql_server
node_mvc_catalog_service -.->|"stores images optionally"| node_azure_blob
node_webforms_container -->|"packages"| node_webforms_auth
node_webforms_auth -->|"protects"| node_webforms_catalog_page
node_webforms_catalog_page -->|"uses"| node_webforms_catalog_service
node_webforms_seed_data -->|"initializes"| node_webforms_catalog_service
node_webforms_catalog_service -->|"persists catalog data"| node_sql_server
node_winforms_client -->|"calls"| node_wcf_service
node_wcf_service -->|"uses"| node_wcf_model
node_wcf_model -->|"persists to"| node_sql_server
node_mvc_container -.->|"deploys to"| node_kubernetes
node_mvc_container -.->|"packages for"| node_service_fabric
node_mvc_container -.->|"deploys to"| node_aci

click node_build "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/build.cmd"
click node_root_compose "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/docker-compose.yml"
click node_legacy_mvc "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopLegacyMVCSolution/src/eShopLegacyMVC/Global.asax.cs"
click node_legacy_webforms "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopLegacyWebFormsSolution/src/eShopLegacyWebForms/Global.asax.cs"
click node_legacy_winforms "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopLegacyNTier/src/eShopWinForms/Program.cs"
click node_mvc_container "https://github.com/dotnet-architecture/eshopmodernizing/tree/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile"
click node_mvc_startup "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs"
click node_mvc_controller "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Controllers/CatalogController.cs"
click node_mvc_catalog_service "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ICatalogService.cs"
click node_mvc_catalog_db "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs"
click node_mvc_initializer "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/Infrastructure/CatalogDBInitializer.cs"
click node_webforms_container "https://github.com/dotnet-architecture/eshopmodernizing/tree/main/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Dockerfile"
click node_webforms_catalog_page "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Catalog/Edit.aspx.cs"
click node_webforms_catalog_service "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Services/CatalogService.cs"
click node_webforms_seed_data "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Models/Infrastructure/PreconfiguredData.cs"
click node_webforms_auth "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Middleware/AuthenticationMiddleware.cs"
click node_winforms_client "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedNTier/src/eShopWinForms/Connected%20Services/eShopServiceReference/Reference.cs"
click node_wcf_service "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedNTier/src/eShopWCFService/CatalogService.svc.cs"
click node_wcf_model "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedNTier/src/eShopWCFService/EntityModel.cs"
click node_azure_blob "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ImageAzureStorage.cs"
click node_kubernetes "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/Kubernetes/eShopModernizedMVC-K8s/ServiceDeployments/eshop-modernized-mvc-k8s-services-deployment.yml"
click node_service_fabric "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/ServiceFabric/eShopModernizedMVC-ServiceFabricApp/ApplicationPackageRoot/ApplicationManifest.xml"
click node_aci "https://github.com/dotnet-architecture/eshopmodernizing/blob/main/ACI/aci.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_legacy_mvc,node_legacy_webforms,node_legacy_winforms toneBlue
class node_mvc_container,node_mvc_startup,node_mvc_controller,node_mvc_catalog_service,node_mvc_catalog_db,node_mvc_initializer,node_webforms_container,node_webforms_catalog_page,node_webforms_catalog_service,node_webforms_seed_data,node_webforms_auth,node_winforms_client,node_wcf_service,node_wcf_model toneAmber
class node_build,node_root_compose,node_sql_server,node_azure_blob,node_kubernetes,node_service_fabric,node_aci toneMint
```

## Components

### Legacy baselines

Retained .NET Framework reference implementations.

- [Legacy MVC app](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopLegacyMVCSolution/src/eShopLegacyMVC/Global.asax.cs): ASP.NET MVC · `eShopLegacyMVCSolution/src/eShopLegacyMVC/Global.asax.cs`
- [Legacy Web Forms app](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopLegacyWebFormsSolution/src/eShopLegacyWebForms/Global.asax.cs): ASP.NET Web Forms · `eShopLegacyWebFormsSolution/src/eShopLegacyWebForms/Global.asax.cs`
- [Legacy WinForms client](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopLegacyNTier/src/eShopWinForms/Program.cs): WinForms · `eShopLegacyNTier/src/eShopWinForms/Program.cs`

### Modernized catalog apps

Container-ready applications with retained catalog workflows.

- [MVC container image](https://github.com/dotnet-architecture/eshopmodernizing/tree/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile): Dockerfile · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile`
- [MVC infrastructure](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs): startup pipeline · Adds authentication, telemetry, and cloud configuration integrations. · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs`
- [MVC catalog controller](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Controllers/CatalogController.cs): HTTP controller · Handles catalog CRUD requests. · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Controllers/CatalogController.cs`
- [MVC catalog service](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ICatalogService.cs): service contract · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ICatalogService.cs`
- [MVC catalog context](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs): EF context · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs`
- [MVC catalog initializer](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/Infrastructure/CatalogDBInitializer.cs): data initializer · Seeds catalog data from packaged CSV files. · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/Infrastructure/CatalogDBInitializer.cs`
- [Web Forms container image](https://github.com/dotnet-architecture/eshopmodernizing/tree/main/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Dockerfile): Dockerfile · `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Dockerfile`
- [Web Forms catalog page](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Catalog/Edit.aspx.cs): code-behind · Handles catalog edit page workflows. · `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Catalog/Edit.aspx.cs`
- [Web Forms catalog service](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Services/CatalogService.cs): application service · `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Services/CatalogService.cs`
- [Web Forms seed data](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Models/Infrastructure/PreconfiguredData.cs): preconfigured data · Supplies packaged catalog initialization data. · `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Models/Infrastructure/PreconfiguredData.cs`
- [Web Forms authentication](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Middleware/AuthenticationMiddleware.cs): middleware · `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Middleware/AuthenticationMiddleware.cs`
- [Modernized WinForms client](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedNTier/src/eShopWinForms/Connected%20Services/eShopServiceReference/Reference.cs): WCF client proxy · Generated service reference used by the desktop client. · `eShopModernizedNTier/src/eShopWinForms/Connected Services/eShopServiceReference/Reference.cs`
- [WCF catalog service](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedNTier/src/eShopWCFService/CatalogService.svc.cs): WCF service · Implements the catalog service boundary. · `eShopModernizedNTier/src/eShopWCFService/CatalogService.svc.cs`
- [WCF entity model](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedNTier/src/eShopWCFService/EntityModel.cs): data model · `eShopModernizedNTier/src/eShopWCFService/EntityModel.cs`

### Runtime and deployment

Local Windows-container topology and cloud deployment assets.

- [Local build entry](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/build.cmd): build script · Builds and starts the local container topology. · `build.cmd`
- [Root Compose topology](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/docker-compose.yml): Docker Compose · Coordinates MVC, Web Forms, WCF, and SQL Server containers. · `docker-compose.yml`
- **SQL Server**: database · Catalog persistence and HiLo identifier allocation.
- [Azure Blob Storage](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ImageAzureStorage.cs): image storage · Optional catalog image store. · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ImageAzureStorage.cs`
- [Kubernetes deployments](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/Kubernetes/eShopModernizedMVC-K8s/ServiceDeployments/eshop-modernized-mvc-k8s-services-deployment.yml): deployment manifests · Deploys MVC, Web Forms, and WCF container combinations. · `Kubernetes/eShopModernizedMVC-K8s/ServiceDeployments/eshop-modernized-mvc-k8s-services-deployment.yml`
- [Service Fabric package](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/ServiceFabric/eShopModernizedMVC-ServiceFabricApp/ApplicationPackageRoot/ApplicationManifest.xml): deployment package · Defines container services and environment parameters. · `ServiceFabric/eShopModernizedMVC-ServiceFabricApp/ApplicationPackageRoot/ApplicationManifest.xml`
- [Azure Container Instances](https://github.com/dotnet-architecture/eshopmodernizing/blob/main/ACI/aci.json): ARM template · `ACI/aci.json`

## Connections

- Local build entry → Root Compose topology: invokes
- Root Compose topology → MVC container image: runs
- Root Compose topology → Web Forms container image: runs
- Root Compose topology → WCF catalog service: hosts
- Root Compose topology → SQL Server: runs
- MVC container image → MVC infrastructure: packages
- MVC infrastructure → MVC catalog controller: routes requests to
- MVC catalog controller → MVC catalog service: uses
- MVC catalog service → MVC catalog context: persists through
- MVC catalog initializer → MVC catalog context: seeds
- MVC catalog context → SQL Server: stores catalog data
- MVC catalog service → Azure Blob Storage: stores images optionally
- Web Forms container image → Web Forms authentication: packages
- Web Forms authentication → Web Forms catalog page: protects
- Web Forms catalog page → Web Forms catalog service: uses
- Web Forms seed data → Web Forms catalog service: initializes
- Web Forms catalog service → SQL Server: persists catalog data
- Modernized WinForms client → WCF catalog service: calls
- WCF catalog service → WCF entity model: uses
- WCF entity model → SQL Server: persists to
- MVC container image → Kubernetes deployments: deploys to
- MVC container image → Service Fabric package: packages for
- MVC container image → Azure Container Instances: deploys to
