Rather than go in depth on all of them we will just give "a quick rundown" over what they are, why they are seen as good, and why they cause issues.
EventSystem, how do you mock out the dependency? you can't right... and what if you are using multi threaded code... uh oh your static class may blow up if you are not accounting for threading.
Userin this case) into one class, SRP to the max! you can inject this in anywhere you need to do something against a user and you know exactly where to put your logic into when you need to do more stuff related to that type.
UserGroupRepositoryNEEDS TO ACCESS THE
UserRepositoryTO DO SOME STUFF" then you end up with repositories including other repositories just to access a couple of methods, then you end up making it harder to test, and each repository has LOADS of tests because it has to test every method you have come up with.
GetAllUsersWithMiddleNameJamesinto their own
IQueryclasses. This allows you to re-use queries within other queries/repositories/classes without including the whole repository and also makes things more testable/mockable as you are testing most parts in isolation.