InFiNet-Code-AB / Dojo-BE

0 stars 3 forks source link

#30 course menagement create connection course has module #166

Closed BojanMirkovic closed 5 months ago

BojanMirkovic commented 5 months ago

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

HubTicaBB commented 5 months ago

LGTM 🙂