title: Can infrastructure services return domain entities in Uncle Bob's The Clean Architecture?
body: <p>Consider:</p>
  <p>The Use Case layer defines an interface</p>
  <pre class="lang-cs prettyprint-override"><code>public interface IGeocoder
  {
      Coordinate GetCoordinate(Address address);
  }
  </code></pre>
  <p><code>Coordinate</code> and <code>Address</code> are value objects defined in the domain layer (i.e. entities layer in Uncle Bob jargon). Obviously the use case (interactor) constructs the <code>Address</code> and passes it to the <code>IGeocoder</code>, expecting a <code>Coordinate</code> to be returned.</p>
  <p>Would this break any Clean Architecture rules? Should I be instead passing DTOs through the interface, so that the actual implementation of the service is not responsible for generating the domain entities? Or is this fine?</p>
  <p>Note that I don't see any difference between this and a repository (entity gateway), whose interface would also be defined in the Use Case layer but implemented in the surrounding Interface Adapters layer:</p>
  <pre class="lang-cs prettyprint-override"><code>public interface IRestaurantRepository
  {
     // ...
  }
  </code></pre>