# kotagirilokesh-sonata/dotnetpoc architecture

> Architecture diagram of the GitHub repository kotagirilokesh-sonata/dotnetpoc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kotagirilokesh-sonata/dotnetpoc
- Repository: https://github.com/kotagirilokesh-sonata/dotnetpoc

## Overview

ItemPortel is a small ASP.NET Core item API. An API client calls the item controller to list items or submit a new one; the controller reads or writes through Entity Framework, using the Item entity and SQL Server. Program starts the host and selects Startup, which configures controller routing, database services, CORS, and Swagger. The source excerpts show API and persistence behavior; no README or UI source documents additional product workflows.

Main entry points: [`ItemPortel/Startup.cs`](https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Startup.cs) (HTTP configuration), [`ItemPortel/Models/TrainingDBContext.cs`](https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Models/TrainingDBContext.cs) (EF context), [`ItemPortel/Controllers/ItemController.cs`](https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Controllers/ItemController.cs) (Item endpoints), [`ItemPortel/Program.cs`](https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Program.cs) (Host entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hosting["Web hosting"]
  node_program["Host entry<br/>[Program.cs]"]
  node_startup["HTTP configuration<br/>[Startup.cs]"]
  node_swagger["Swagger UI<br/>[Startup.cs]"]
end

subgraph group_api["Item API"]
  node_controller["Item endpoints<br/>[ItemController.cs]"]
end

subgraph group_data["Persistence"]
  node_item["Item entity<br/>[Item.cs]"]
  node_context["EF context"]
end

node_client(("API client"))
node_sql[("SQL Server")]

node_program -->|"starts with"| node_startup
node_startup -->|"routes controllers"| node_controller
node_startup -->|"configures database"| node_context
node_startup -->|"enables docs"| node_swagger
node_client -->|"requests items"| node_controller
node_controller -->|"reads and writes"| node_context
node_context -->|"maps entity"| node_item
node_context -->|"uses SQL Server"| node_sql

click node_program "https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Program.cs"
click node_startup "https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Startup.cs"
click node_swagger "https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Startup.cs"
click node_controller "https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Controllers/ItemController.cs"
click node_item "https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Models/Item.cs"
click node_context "https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Models/TrainingDBContext.cs"

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_program,node_startup,node_swagger,node_client toneBlue
class node_controller,node_sql toneAmber
class node_item,node_context toneMint
```

## Components

### Web hosting

- [Host entry](https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Program.cs): `ItemPortel/Program.cs`
- [HTTP configuration](https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Startup.cs): `ItemPortel/Startup.cs`
- [Swagger UI](https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Startup.cs): `ItemPortel/Startup.cs`

### Item API

- [Item endpoints](https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Controllers/ItemController.cs): `ItemPortel/Controllers/ItemController.cs`

### Persistence

- [Item entity](https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Models/Item.cs): `ItemPortel/Models/Item.cs`
- [EF context](https://github.com/kotagirilokesh-sonata/dotnetpoc/blob/master/ItemPortel/Models/TrainingDBContext.cs): `ItemPortel/Models/TrainingDBContext.cs`

### Other components

- **API client**
- **SQL Server**

## Connections

- Host entry → HTTP configuration: starts with (evidence: `ItemPortel/Program.cs`)
- HTTP configuration → Item endpoints: routes controllers (evidence: `ItemPortel/Startup.cs`)
- HTTP configuration → EF context: configures database (evidence: `ItemPortel/Startup.cs`)
- HTTP configuration → Swagger UI: enables docs (evidence: `ItemPortel/Startup.cs`)
- API client → Item endpoints: requests items (evidence: `ItemPortel/Controllers/ItemController.cs`)
- Item endpoints → EF context: reads and writes (evidence: `ItemPortel/Controllers/ItemController.cs`)
- EF context → Item entity: maps entity (evidence: `ItemPortel/Models/TrainingDBContext.cs`)
- EF context → SQL Server: uses SQL Server (evidence: `ItemPortel/Models/TrainingDBContext.cs`)
