# abdelrhman9048-dotcom/g-asp-net-96-ef3 architecture

> Architecture diagram of the GitHub repository abdelrhman9048-dotcom/g-asp-net-96-ef3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdelrhman9048-dotcom/g-asp-net-96-ef3
- Repository: https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3

## Overview

Session03 is a console-based online-learning sample demonstrating course, category, instructor, student, and enrollment operations with Entity Framework Core and SQL Server. Its principal workflow is to create a database context, apply migrations, seed or modify learning data, validate enrollment and course actions, and persist changes. The domain models and entity configurations define the persisted relationships and constraints. The README is empty; operations are summarized from the shown Program excerpt, so unsampled methods are not mapped as separate components.

Main entry points: [`Session03/Contexts/LearningDbContext.cs`](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Contexts/LearningDbContext.cs) (Learning context), [`Session03/Models/Enrollment.cs`](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Enrollment.cs) (Enrollment), [`Session03/Models/Course.cs`](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Course.cs) (Course), [`Session03/Program.cs`](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Program.cs) (Demo operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Console application"]
  node_program["Demo operations<br/>[Program.cs]"]
end

subgraph group_domain["Learning domain"]
  node_instructor["Instructor<br/>[Instructor.cs]"]
  node_category["Category hierarchy<br/>[Category.cs]"]
  node_course["Course<br/>[Course.cs]"]
  node_courselevel["Course level<br/>[CourseLevel.cs]"]
  node_student["Student<br/>[Student.cs]"]
  node_enrollment["Enrollment<br/>[Enrollment.cs]"]
  node_enrollmentstatus["Enrollment status"]
end

subgraph group_persistence["Persistence"]
  node_context["Learning context"]
  node_instructorconfig["Instructor mapping"]
  node_categoryconfig["Category mapping"]
  node_courseconfig["Course mapping"]
  node_studentconfig["Student mapping"]
  node_enrollmentconfig["Enrollment mapping"]
end

node_sqlserver[("SQL Server database")]

node_program -->|"creates and migrates"| node_context
node_context -->|"configures SQL Server"| node_sqlserver
node_context -->|"applies mapping"| node_instructorconfig
node_context -->|"applies mapping"| node_categoryconfig
node_context -->|"applies mapping"| node_courseconfig
node_context -->|"applies mapping"| node_studentconfig
node_context -->|"applies mapping"| node_enrollmentconfig
node_instructorconfig -->|"configures"| node_instructor
node_categoryconfig -->|"configures"| node_category
node_courseconfig -->|"configures"| node_course
node_courseconfig -->|"stores as text"| node_courselevel
node_studentconfig -->|"configures"| node_student
node_enrollmentconfig -->|"configures"| node_enrollment
node_enrollment -->|"has status"| node_enrollmentstatus
node_course -->|"references instructor"| node_instructor
node_course -->|"references category"| node_category
node_enrollment -->|"references student"| node_student
node_enrollment -->|"references course"| node_course
node_program -->|"uses course level"| node_courselevel
node_program -->|"sets completion status"| node_enrollmentstatus

click node_program "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Program.cs"
click node_context "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Contexts/LearningDbContext.cs"
click node_instructor "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Instructor.cs"
click node_category "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Category.cs"
click node_course "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Course.cs"
click node_courselevel "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/CourseLevel.cs"
click node_student "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Student.cs"
click node_enrollment "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Enrollment.cs"
click node_enrollmentstatus "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/EnrollmentStatus.cs"
click node_instructorconfig "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Configurations/InstructorConfigurations.cs"
click node_categoryconfig "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Configurations/CategoryConfigurations.cs"
click node_courseconfig "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Configurations/CourseConfigurations.cs"
click node_studentconfig "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Configurations/StudentConfigurations.cs"
click node_enrollmentconfig "https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Configurations/EnrollmentConfigurations.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 toneBlue
class node_instructor,node_category,node_course,node_courselevel,node_student,node_enrollment,node_enrollmentstatus,node_sqlserver toneAmber
class node_context,node_instructorconfig,node_categoryconfig,node_courseconfig,node_studentconfig,node_enrollmentconfig toneMint
```

## Components

### Console application

- [Demo operations](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Program.cs): `Session03/Program.cs`

### Learning domain

- [Instructor](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Instructor.cs): `Session03/Models/Instructor.cs`
- [Category hierarchy](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Category.cs): `Session03/Models/Category.cs`
- [Course](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Course.cs): `Session03/Models/Course.cs`
- [Course level](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/CourseLevel.cs): `Session03/Models/CourseLevel.cs`
- [Student](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Student.cs): `Session03/Models/Student.cs`
- [Enrollment](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/Enrollment.cs): `Session03/Models/Enrollment.cs`
- [Enrollment status](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Models/EnrollmentStatus.cs): `Session03/Models/EnrollmentStatus.cs`

### Persistence

- [Learning context](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Contexts/LearningDbContext.cs): `Session03/Contexts/LearningDbContext.cs`
- [Instructor mapping](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Configurations/InstructorConfigurations.cs): `Session03/Configurations/InstructorConfigurations.cs`
- [Category mapping](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Configurations/CategoryConfigurations.cs): `Session03/Configurations/CategoryConfigurations.cs`
- [Course mapping](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Configurations/CourseConfigurations.cs): `Session03/Configurations/CourseConfigurations.cs`
- [Student mapping](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Configurations/StudentConfigurations.cs): `Session03/Configurations/StudentConfigurations.cs`
- [Enrollment mapping](https://github.com/abdelrhman9048-dotcom/g-asp-net-96-ef3/blob/master/Session03/Configurations/EnrollmentConfigurations.cs): `Session03/Configurations/EnrollmentConfigurations.cs`

### Other components

- **SQL Server database**

## Connections

- Demo operations → Learning context: creates and migrates (evidence: `Session03/Program.cs`)
- Learning context → SQL Server database: configures SQL Server (evidence: `Session03/Contexts/LearningDbContext.cs`)
- Learning context → Instructor mapping: applies mapping (evidence: `Session03/Contexts/LearningDbContext.cs`)
- Learning context → Category mapping: applies mapping (evidence: `Session03/Contexts/LearningDbContext.cs`)
- Learning context → Course mapping: applies mapping (evidence: `Session03/Contexts/LearningDbContext.cs`)
- Learning context → Student mapping: applies mapping (evidence: `Session03/Contexts/LearningDbContext.cs`)
- Learning context → Enrollment mapping: applies mapping (evidence: `Session03/Contexts/LearningDbContext.cs`)
- Instructor mapping → Instructor: configures (evidence: `Session03/Configurations/InstructorConfigurations.cs`)
- Category mapping → Category hierarchy: configures (evidence: `Session03/Configurations/CategoryConfigurations.cs`)
- Course mapping → Course: configures (evidence: `Session03/Configurations/CourseConfigurations.cs`)
- Course mapping → Course level: stores as text (evidence: `Session03/Configurations/CourseConfigurations.cs`)
- Student mapping → Student: configures (evidence: `Session03/Configurations/StudentConfigurations.cs`)
- Enrollment mapping → Enrollment: configures (evidence: `Session03/Configurations/EnrollmentConfigurations.cs`)
- Enrollment → Enrollment status: has status (evidence: `Session03/Models/Enrollment.cs`)
- Course → Instructor: references instructor (evidence: `Session03/Models/Course.cs`)
- Course → Category hierarchy: references category (evidence: `Session03/Models/Course.cs`)
- Enrollment → Student: references student (evidence: `Session03/Models/Enrollment.cs`)
- Enrollment → Course: references course (evidence: `Session03/Models/Enrollment.cs`)
- Demo operations → Course level: uses course level (evidence: `Session03/Program.cs`)
- Demo operations → Enrollment status: sets completion status (evidence: `Session03/Program.cs`)
