Yaojia Wang d2ed21873e refactor(backend): Remove ITenantContext from Command/Query Handlers
Fix architectural issue where tenant isolation logic was incorrectly placed
in the Application layer (Handlers) instead of the Infrastructure layer
(DbContext/Repository).

Changes:
- Removed ITenantContext injection from 12 Command/Query Handlers
- Removed manual tenant verification code from all handlers
- Tenant isolation now handled exclusively by Global Query Filters in PMDbContext
- Handlers now focus purely on business logic, not cross-cutting concerns

Architecture Benefits:
- Proper separation of concerns (Handler = business logic, DbContext = tenant filtering)
- Eliminates code duplication across handlers
- Follows Repository pattern correctly
- Single Responsibility Principle compliance
- Cleaner, more maintainable code

Affected Handlers:
- CreateEpicCommandHandler
- UpdateEpicCommandHandler
- CreateStoryCommandHandler
- UpdateStoryCommandHandler
- AssignStoryCommandHandler
- DeleteStoryCommandHandler
- CreateTaskCommandHandler
- UpdateTaskCommandHandler
- AssignTaskCommandHandler
- DeleteTaskCommandHandler
- UpdateTaskStatusCommandHandler
- GetEpicByIdQueryHandler

Technical Notes:
- PMDbContext already has Global Query Filters configured correctly
- Project aggregate passes TenantId when creating child entities
- Repository queries automatically filtered by tenant via EF Core filters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 17:15:43 +01:00
2025-11-04 12:28:53 +01:00
2025-11-02 23:55:18 +01:00
2025-11-03 11:51:02 +01:00
2025-11-03 20:02:41 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-03 11:51:02 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-04 12:28:53 +01:00
2025-11-04 12:28:53 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
Description
No description provided
3.4 MiB
Languages
C# 88.5%
PowerShell 10.4%
Shell 0.8%
Dockerfile 0.3%