refactor: clean project based session01 notes

This commit is contained in:
2025-07-18 11:21:59 +03:30
parent baacd43252
commit 79f912c966
3 changed files with 65 additions and 77 deletions
@@ -102,12 +102,9 @@ var invalidUser = new User(); // ❌ Compilation Error: Name is required
## **A note about strings in C# (Chat GPT) :**
**`string` is nullable in C#**, but in **nullable reference types (C# 8+), `string` is treated as non-nullable unless explicitly marked `string?`**.
- **`string`** → Default behavior (non-nullable by default in nullable context).
- **`string?`** → Explicitly nullable.
## **Why virtual navigation properties? (Chat GPT):**
- If you mark a navigation property as `virtual`, EF Core **creates a proxy class** at runtime that overrides the property and loads related data **only when accessed**.
@@ -148,3 +145,5 @@ var tickets = context.Tickets.ToList(); // Loads all tickets foreach (var ticket
---