CQRS where to put domain / business logic <p>I am developing framework for MVC application. As part of framework, I have created a dummy application. I am following Onion Architecture and SOLID principle with CQRS. This is my first project with MVC and CQRS. I am also following Chain of Responsibility in CQRS.</p> <p>At present I am not sure about the part where I should keep business logic.</p> <p>Example. I have Command of Debit Account from bank account. I have created command as DebitAccount and handler as IDebitAccountHandler. IDebitAccountHandler will be implemented in Infrastructure layer with required dependencies as DebitAccountHandler.</p> <p>Here I have core logic of checking balance before debiting account. I would want to implement this in Core as it does not change with Infrastructure.</p> <p>Now where should I implement this logic and also load required dependencies. My commands are interfaces without any method body, also they contain only on method of Handle/Execute. </p> <p>I feel this is newbie question and arising due to my limited understanding of patterns.</p>