title: Injecting a service into another service
body: <p>I have an MVC project which has two services an OrganisationService and an AgreementService, my problem is that some of the organisations belong to a group/parent structure, when this is the case I need to get all agreements that belong to any of the organisations within the group.</p>
  
  <p>I already have a method in my OrganisationService that can return a list of all the ids for organisations within the structure:</p>
  
  <pre><code>IEnumerable&lt;int&gt; GetRelatedOrganisationIds(int id)
  </code></pre>
  
  <p>I could create a method in the AgreementService which accepts the result of this but then I would need to inject both services into my controller and call them in turn e.g.</p>
  
  <pre><code>GetAgreementsByOrganisationIdList(IEnumerable&lt;int&gt; organisationIdList)
  </code></pre>
  
  <p>Is it ok to inject the OrganisationService into the AgreementService so that it can do the work itself?  For example the following method would call GetRelatedOrganisationIds internally:</p>
  
  <pre><code>GetAgreementsByOrganisationId(int id)
  </code></pre>
  
  <p>Another reason I would like to inject it into the AgreementService is that I would not need to remember to check if the organisation was in a group/parent relationship and look up the ids each time I wanted to get a list of agreements.</p>
  
  <p>I also thought of creating an OrganisationGroupParentInformationProvider and injecting that into the AgreementService instead, I may have spent far too much time thinking about this one....  how would you do it?</p>