title: Repository pattern and Business logic
body: <p>I have a repository (<code>CustomerRepository</code>) that retrieves data from the data layer. Most of the business logic is in the entity class (<code>Customer</code>) that the repository either accepts or returns.</p>
  
  <p>However, where do you put the global entity business logic (that applies to all customers)?</p>
  
  <p>For instance, I may not want to return all customers to certain users. I don't want to put that logic in the repository.</p>