Creates a new CategoryService instance.
The query repository for finding categories
The command repository for creating categories
Resolves an existing category or creates a new one.
The category name to resolve
The user ID for tenant isolation
The category ID (existing or newly created)
Domain service for Category resolution.
Remarks
Encapsulates the business logic for resolving or creating categories. Ensures that category existence check and creation is handled correctly with proper race condition handling.
Example
See