Enterprise Application Architecture with .NET Core
上QQ阅读APP看书,第一时间看更新

SRP - Single Responsibility Principle

"A class should have one, and only one, reason to change."

This primarily means that a class should have one main task, that is, a specific interface or a single responsibility to achieve. A class with one specific responsibility and objective is easier to code and maintain as it's clearer. Any further changes to the objectives should either be a separate interface that is implemented separately or a derived class, or they should be implemented in a way that the addition of behavior is added in a separate class.