# mvpsaurav/curdmvc architecture

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

- Interactive diagram: https://gitdiagram.com/mvpsaurav/curdmvc
- Repository: https://github.com/mvpsaurav/curdmvc

## Overview

This is an ASP.NET Core MVC student-record application. Its default route opens the student list; users can create and edit records, including uploading an image, while records are persisted through Entity Framework Core to SQL Server. The graph also includes the separate Home pages and the student/error models. The view files and migrations are present in the tree, but their contents were not sampled; view links reflect MVC action behavior and the matching view directories, not inspected view implementations.

Main entry points: [`Controllers/StudentController.cs`](https://github.com/mvpsaurav/curdmvc/blob/main/Controllers/StudentController.cs) (Student actions), [`Context/Data.cs`](https://github.com/mvpsaurav/curdmvc/blob/main/Context/Data.cs) (EF data context), [`Controllers/HomeController.cs`](https://github.com/mvpsaurav/curdmvc/blob/main/Controllers/HomeController.cs) (Home actions), [`Program.cs`](https://github.com/mvpsaurav/curdmvc/blob/main/Program.cs) (Application startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_app["Application startup<br/>[Program.cs]"]
end

subgraph group_student["Student workflow"]
  node_student_controller["Student actions"]
  node_student_model["Student record<br/>[Student.cs]"]
  node_image_files["Student images"]
end

subgraph group_persistence["Persistence"]
  node_data_context["EF data context<br/>[Data.cs]"]
  node_sql_server[("SQL Server")]
end

subgraph group_presentation["MVC presentation"]
  node_home_controller["Home actions<br/>[HomeController.cs]"]
  node_error_model["Error model<br/>[ErrorViewModel.cs]"]
  node_student_views["Student views"]
  node_home_views["Home views"]
  node_error_view["Error view<br/>[Error.cshtml]"]
end

node_browser(("Browser"))

node_browser -->|"sends requests"| node_app
node_app -->|"routes default"| node_student_controller
node_student_controller -->|"queries and saves"| node_data_context
node_student_controller -->|"binds records"| node_student_model
node_data_context -->|"maps entity"| node_student_model
node_app -->|"configures database"| node_data_context
node_data_context -->|"uses provider"| node_sql_server
node_student_controller -->|"writes uploads"| node_image_files
node_student_controller -.->|"returns views"| node_student_views
node_home_controller -->|"creates error model"| node_error_model
node_home_controller -.->|"returns views"| node_home_views
node_home_controller -.->|"serves error page"| node_error_view

click node_app "https://github.com/mvpsaurav/curdmvc/blob/main/Program.cs"
click node_student_controller "https://github.com/mvpsaurav/curdmvc/blob/main/Controllers/StudentController.cs"
click node_home_controller "https://github.com/mvpsaurav/curdmvc/blob/main/Controllers/HomeController.cs"
click node_student_model "https://github.com/mvpsaurav/curdmvc/blob/main/Models/Student.cs"
click node_error_model "https://github.com/mvpsaurav/curdmvc/blob/main/Models/ErrorViewModel.cs"
click node_data_context "https://github.com/mvpsaurav/curdmvc/blob/main/Context/Data.cs"
click node_image_files "https://github.com/mvpsaurav/curdmvc/tree/main/wwwroot/Images"
click node_student_views "https://github.com/mvpsaurav/curdmvc/tree/main/Views/Student"
click node_home_views "https://github.com/mvpsaurav/curdmvc/tree/main/Views/Home"
click node_error_view "https://github.com/mvpsaurav/curdmvc/blob/main/Views/Shared/Error.cshtml"

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_app,node_browser toneBlue
class node_student_controller,node_student_model,node_image_files toneAmber
class node_data_context,node_sql_server toneMint
class node_home_controller,node_error_model,node_student_views,node_home_views,node_error_view toneRose
```

## Components

### Web entry

- [Application startup](https://github.com/mvpsaurav/curdmvc/blob/main/Program.cs): `Program.cs`

### Student workflow

- [Student actions](https://github.com/mvpsaurav/curdmvc/blob/main/Controllers/StudentController.cs): `Controllers/StudentController.cs`
- [Student record](https://github.com/mvpsaurav/curdmvc/blob/main/Models/Student.cs): `Models/Student.cs`
- [Student images](https://github.com/mvpsaurav/curdmvc/tree/main/wwwroot/Images): `wwwroot/Images`

### Persistence

- [EF data context](https://github.com/mvpsaurav/curdmvc/blob/main/Context/Data.cs): `Context/Data.cs`
- **SQL Server**

### MVC presentation

- [Home actions](https://github.com/mvpsaurav/curdmvc/blob/main/Controllers/HomeController.cs): `Controllers/HomeController.cs`
- [Error model](https://github.com/mvpsaurav/curdmvc/blob/main/Models/ErrorViewModel.cs): `Models/ErrorViewModel.cs`
- [Student views](https://github.com/mvpsaurav/curdmvc/tree/main/Views/Student): `Views/Student`
- [Home views](https://github.com/mvpsaurav/curdmvc/tree/main/Views/Home): `Views/Home`
- [Error view](https://github.com/mvpsaurav/curdmvc/blob/main/Views/Shared/Error.cshtml): `Views/Shared/Error.cshtml`

### Other components

- **Browser**

## Connections

- Browser → Application startup: sends requests (evidence: `Program.cs`)
- Application startup → Student actions: routes default (evidence: `Program.cs`)
- Student actions → EF data context: queries and saves (evidence: `Controllers/StudentController.cs`)
- Student actions → Student record: binds records (evidence: `Controllers/StudentController.cs`)
- EF data context → Student record: maps entity (evidence: `Context/Data.cs`)
- Application startup → EF data context: configures database (evidence: `Program.cs`)
- EF data context → SQL Server: uses provider
- Student actions → Student images: writes uploads (evidence: `Controllers/StudentController.cs`)
- Student actions → Student views: returns views
- Home actions → Error model: creates error model (evidence: `Controllers/HomeController.cs`)
- Home actions → Home views: returns views
- Home actions → Error view: serves error page
