Commands can be complicated to test and reuse. In a previous post, I demonstrated how to build reusable testable Queries, in this series of posts I will show you how to build commands which can be tested and reused.
This small yet powerful interface can help you build commands which respect SOLID principles like the Single Responsibility Principal (SRP), the Open/Closed Principle (OCP) and the Dependency inversion principle (DIP).
public interface IModelCommand<in TModel> { void Apply(TModel model); }