refactor: clean project based session01 notes
This commit is contained in:
@@ -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
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user