title: Where To Put Ad-hoc Commands/Queries in an Application That is Primarily DDD
body: <p>I am working on a web application using a domain driven design approach, however there are some aspects of my application that are not a good fit with DDD.  For example we need to do bulk updates of employee salaries. It is not efficient to load the entire employee entity and save it for each employee as there are often hundreds of salaries updated at once. Further, there are are other tasks that need to be performed at the same time such as logging the old salary and recording the effective date of the new salary. So I would say this type of operation is outside the bounded context of my core domain. Further I understand that this operation might best be approached from a procedural perspective. That's all fine and good, however I still want my application to be coherent and organized regardless of what approach I am using in a specific part of my app.</p>
  
  <p>For example I am using the following structure.</p>
  
  <ul>
  <li>UI</li>
  <li>Application   </li>
  <li>Model</li>
  <li>Infrastructure</li>
  </ul>
  
  <p>I would like to stick to this structure even for things outside the bounded context of my core domain. My concern at the moment is primarily about my infrastructure layer. Originally I was using the following within Infrastructure:</p>
  
  <ul>
  <li>Repositories</li>
  <li>Finders (for separate read model)</li>
  <li>Commands</li>
  </ul>
  
  <p>I put ad-hoc read queries in Finders and ad-hoc commands in Commands. The problem with this is that some operations require a series of queries AND commands and it seems more organized to me to group them all together in one unit. Kind of like a repository, but instead of providing access to domain entities it encapsulates a set of queries and commands that make up a specific procedure.  </p>
  
  <p>So what I am looking for is suggestions re naming conventions for changing the "Commands"  folder/namespace to something that better describes a series of queries/commands that logically fit together. Is there already a name/pattern for this that I am not aware of? </p>
  
  <p>Update:</p>
  
  <p>Am currently considering the namespace "Procedures" to describe the these queries/commands that logically fit together. On the one hand it is fitting because what I am describing is similar to stored procs and it is descriptive that this part of the application is using a procedural rather than DDD approach. My only misgiving is that this naming convention implies the use of stored procs, which is not the case. </p>