Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This sounds like a classic circular dependency problem. It's important for us to know whether the IT service depends on the HR service, or vice versa, or if there is a need for two-way communication between the two. If one depends on the other, then my recommendation is to have two solutions. Let's say IT depends on HR. Then in HR you might have a Core project that defines your domain objects and interfaces, including Events or Commands that need to be represented as messages. Core has no dependencies - it does not reference NServiceBus or any other projects in your solution. Within the same solution, you might have an HR.Infrastructure project, that references Core. Within this, you can define your messages, such that they inherit from Core's Events and Commands, as well as implementing NServiceBus.IMessage (and thus referencing NServiceBus). Now IT can simply reference HR.Core and HR.Infrastructure in order to deal with messages.</p> <p>If there needs to be bidirectional communication, then you simply need to pull the messages out into their own solution/project, and have both Infrastructure projects depend/reference it. You should not have your Core project reference it, as this would create a dependency chain to NServiceBus from your Core, which you want to avoid. If this seems odd, read up on <a href="http://jeffreypalermo.com/blog/the-onion-architecture-part-1/" rel="nofollow">Onion Architecture</a> and <a href="http://en.wikipedia.org/wiki/Dependency_inversion_principle" rel="nofollow">Dependency Inversion Principle</a> to see how this is done.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload