# pavanpamarthi118/asp-net-core architecture

> Architecture diagram of the GitHub repository pavanpamarthi118/asp-net-core, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pavanpamarthi118/asp-net-core
- Repository: https://github.com/pavanpamarthi118/asp-net-core

## Overview

##### Main Components
- API Entry Point – Represented by Program.cs, which configures and starts the application.
- HTTP/API Layer – Use a component labeled “API Endpoints” (example: GamesEndpoints.cs) that handles incoming HTTP requests.
- Business/Domain Layer – Illustrate the Entities (Game, Genre) which model the domain logic.
- Data Access Layer – Show the DbContext (GameStoreContext.cs) that interacts with the database; this is where EF Core does its job.
- Database System – Represent the underlying database that receives schema updates through EF Core migrations.

##### Relationships and Interactions
- Optionally, illustrate the fact that EF Core migrations (depicted as a process/module) affect the structure of the database.

##### Architectural Patterns and Principles
- Separation of concerns: routing (API endpoints), data transfer (DTOs), domain/business logic (Entities), and persistence (Data context and Database).
- Dependency inversion by noting that the API does not directly send SQL but rather uses EF Core mechanisms to handle migration and updates.
- Notes showing that configuration files (appsettings.json, launchSettings.json) also play a role in setting application parameters (e.g., connection strings, environment settings).

##### Relevant Technologies/Frameworks
- ASP.NET Core for the REST API and endpoint management.
- Entity Framework Core for data access and migrations.
- .NET 9.0 (as reflected in the compilation output) as the runtime environment.
- Annotations regarding build configuration and deployment (e.g., the presence of nuget.config, csproj files).

## Diagram (Mermaid)

```mermaid
flowchart TD
    Client("Client"):::client
    APIEntry("API Entry Point (Program.cs)"):::app
    APIEndpoints("HTTP/API Layer (GamesEndpoints.cs)"):::endpoints
    DTOs("DTO Layer"):::dtos
    Domain("Business/Domain Layer (Game, Genre)"):::entities
    DataAccess("Data Access Layer (GameStoreContext)"):::data
    Database("Database"):::database

    Client -->|"HTTPRequest"| APIEntry
    APIEntry -->|"configures"| APIEndpoints
    APIEndpoints -->|"handles"| DTOs
    DTOs -->|"mapsTo"| Domain
    Domain -->|"uses"| DataAccess
    DataAccess -->|"queries/migrations"| Database
    Database -->|"responses"| DataAccess
    DataAccess ---|"EFCoreMigrations"| Database

    subgraph "Configuration Files"
        ConfigA("appsettings.json"):::config
        ConfigL("launchSettings.json"):::config
    end
    APIEntry -->|"loads"| ConfigA

    click APIEntry "https://github.com/pavanpamarthi118/asp-net-core/blob/main/GameStore.Api/Program.cs"
    click APIEndpoints "https://github.com/pavanpamarthi118/asp-net-core/blob/main/GameStore.Api/EndPoints/GamesEndpoints.cs"
    click DTOs "https://github.com/pavanpamarthi118/asp-net-core/tree/main/GameStore.Api/Dtos"
    click Domain "https://github.com/pavanpamarthi118/asp-net-core/tree/main/GameStore.Api/Entities"
    click DataAccess "https://github.com/pavanpamarthi118/asp-net-core/blob/main/GameStore.Api/Data/GameStoreContext.cs"
    click ConfigA "https://github.com/pavanpamarthi118/asp-net-core/blob/main/GameStore.Api/appsettings.json"
    click ConfigL "https://github.com/pavanpamarthi118/asp-net-core/blob/main/GameStore.Api/Properties/launchSettings.json"

    classDef client fill:#FCF3CF,stroke:#B7950B,stroke-width:2px;
    classDef app fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef endpoints fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef dtos fill:#D5F5E3,stroke:#1E8449,stroke-width:2px;
    classDef entities fill:#FAD7A0,stroke:#D35400,stroke-width:2px;
    classDef data fill:#E8DAEF,stroke:#6C3483,stroke-width:2px;
    classDef database fill:#F5B7B1,stroke:#922B21,stroke-width:2px;
    classDef config fill:#EAECEE,stroke:#566573,stroke-width:2px;
```
