title: Domain Driven Design: Can Infrastructure or Repositories use Domain objects?
body: <p>Considering Domain Driven Design, can Infrastructure or System use Domain's objects (Values, Entities, etc.), or should it be applied Dependency Inversion, so that Infrastructure will only depend on Interfaces defined by itself?</p>
  
  <p>What about the Repository? Does it applies de same?</p>
  
  <p>Is it a violation to a Infrastructure, Repository or a System code depends on the Domain?</p>
  
  <p>(A) Example code where Infrastructure depends on the Domain:</p>
  
  <pre><code>namespace Infrastrcuture {
      public class Sender {
          public void Send (Domain.DataValue data) { ... }
      }
  }
  </code></pre>
  
  <p>(B) Example code where Infrastructure will not depend on the Domain:</p>
  
  <pre><code>namespace Infrastrcuture {
      public interface ISendableData {
          ...
      }
      public class Sender {
          public void Send (ISendableData data) { ... }
      }
  }
  </code></pre>