Refactoring code to avoid anti-pattern

I wouldn’t say that it’s an anti-pattern since an anti-pattern is supposed to be a pattern in the first place (a recognizable, widespread way of doing things) and I don’t know of any “Repository-in-the-Domain-object” pattern. However, it’s certainly bad practice IMO because your BankAccount domain object mixes 3 responsibilities : Its natural and legitimate responsibility … Read more