I have created CreateCourseHasModuleConnection endpoint and related Command and Handler with Repository method and releted tests.
I have noticed that often we are using same kind of OperationResult class in all Commands (CreateCourseResult,DeleteCourseResult...) all of them are sharing same code , so I have decide to make generic OperationResult class in Domain-Layer and to implement in Command CreateCourseHasModuleConnection .
This generic class can be easily implemented in rest of commands that way we are going to be sure that we are following DRY principal of clean code.
Changes Made
CreateCourseHasModuleConnection endpoint, command + handler, repository, tests
DeleteModuleByModuleIdAsync is updated in oreder to delete all relations if module with that id has ben deleted
Related Ticket or Issue
30
160
136
Checklist
[x] Code adheres to the coding conventions
[x] Unit tests are added for new code
[x] Existing unit tests are updated if needed
[x] Code follows the principles of Clean Architecture
[x] Code formatting complies with the .editorconfig file
CreateCourseHasModuleConnection
Description
I have created CreateCourseHasModuleConnection endpoint and related Command and Handler with Repository method and releted tests. I have noticed that often we are using same kind of OperationResult class in all Commands (CreateCourseResult,DeleteCourseResult...) all of them are sharing same code , so I have decide to make generic OperationResult class in Domain-Layer and to implement in Command CreateCourseHasModuleConnection . This generic class can be easily implemented in rest of commands that way we are going to be sure that we are following DRY principal of clean code.
Changes Made
CreateCourseHasModuleConnection endpoint, command + handler, repository, tests DeleteModuleByModuleIdAsync is updated in oreder to delete all relations if module with that id has ben deleted
Related Ticket or Issue
30
160
136
Checklist
.editorconfig
file