Infrastructure Layer¶
Project:
KeDevO.YardPro.InfrastructureType: .NET 10.0 Class Library
Implements all external concerns — database persistence (EF Core), repository patterns, file storage, security, logging.
Architecture Role¶
Persistence¶
AppDbContext (EF Core + SQLite)¶
Entity configurations in Persistence/Configurations/ — one per entity.
Repositories¶
Generic Repository (Repository<T>)¶
Standard CRUD operations for all entities.
Specialized Repositories¶
Extended repositories with domain-specific queries (filtering, includes, pagination).
Security¶
Password Hashing (DefaultPasswordHasher)¶
| Parameter | Value |
|---|---|
| Algorithm | PBKDF2 |
| Hash function | SHA-256 |
| Iterations | 120,000 |
| Salt length | 16 bytes |
| Key length | 32 bytes |
| Storage format | {iterations}.{base64salt}.{base64key} |
Storage¶
LocalDiskMediaStorage¶
| Setting | Value |
|---|---|
| Base path | {WebRootPath}/uploads/ |
| Vehicle media | uploads/vehicles/{vehicleId}/{guid}.{ext} |
| Part media | uploads/parts/{partId}/{guid}.{ext} |
| File naming | GUID-based to prevent conflicts |
Utilities¶
VinValidator— ISO 3779 VIN validation
Contributing Guidelines¶
- All database access through repositories — never inject DbContext directly
- Migrations only forward — never edit existing migrations
- Entity configs in
Persistence/Configurations/ - Interface-first — define in
Interfaces/before implementing - No domain logic — Infrastructure handles persistence and I/O only