79426772

Date: 2025-02-10 10:32:04
Score: 1
Natty:
Report link

There's no actual duplication on your commands, what you have to do is to encapsulate that db query logic into repository method and call that method in both command handlers, for example:

var user = UserRepository.GetUserByEmail(command.EmailAddress);
...user logic...
UserRepository.update(user);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Erik Vasilyan