title: Avoid cyclic dependency in n-layer architecture in .NET Core
body: <p>I have created such n-layer architecture in .net core (console app):</p>
  
  <pre><code>Company.App
     -&gt; reference to Company.Services
     -&gt; reference to Company.Infrastructure
  
  Company.Services
     -&gt; reference to Company.Infrastructure
  
     + IWorkStarter
     + WorkStarter - (ExternalClient is injected)
  
  Company.Infrastructure
     + RabbitMqConsumer - (IWorkStarter must be injected) - Cyclic dependency
     + IExternalClient
  </code></pre>
  
  <p>As you see <code>Services</code> already has a reference to <code>Infrastructure</code>. And I have to use <code>IWorkStarter</code> inside rabbit consumer as well. It seems I have no required knowledge  to separate those components in a right way. Could you please help me? The project is quite simple.</p>