-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor category update logic in UpdatePostCommandHandler
Moved category update logic from Handle method to new private UpdateCats method. UpdateCats handles MySQL workaround by deleting old post-category relationships and clearing the PostCategory collection of PostEntity, then adds new post-category relationships based on provided category IDs. This refactor simplifies the Handle method and improves code readability.
- Loading branch information
Showing
1 changed file
with
25 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters