title: Can one implement an interface property on an Entity Object interface?
body: <p>I'm using Entity Framework and I have created an interface for lease transactions:</p>
  
  <pre><code>public interface ILeaseTransaction
  {
      int ID { get; }
      DateTime Date { get; }
      decimal Amount { get; }
  }
  </code></pre>
  
  <p>Then to implement the interface on the Entity Object I created an empty partial class:</p>
  
  <pre><code>public partial class Type1LeaseTransaction : ILeaseTransaction
  {
  
  }
  </code></pre>
  
  <p>This works fine, however transactions can also have zero or one Voids which are also Entity Objects. I attempted to implement the Voids as follows:</p>
  
  <pre><code>public interface ILeaseTransactionVoid
  {
      int TransactionID { get; }
      DateTime Date { get; }
      int TypeID { get; }
  }
  </code></pre>
  
  <p>And the empty partial class...:</p>
  
  <pre><code>public partial class Type1LeaseTransactionVoid : ILeaseTransactionVoid
  {
  
  }
  </code></pre>
  
  <p>The problem I am running into is when I try to add the <code>ILeaseTransactionVoid</code> as a property to the <code>LeaseTransaction</code> interface:</p>
  
  <pre><code>public interface ILeaseTransaction
  {
      int ID { get; }
      DateTime Date { get; }
      decimal Amount { get; }
      ILeaseTransactionVoid Void { get; } // This throws an error
  }
  </code></pre>
  
  <p>When I try and build I get the following error:</p>
  
  <blockquote>
    <p>'DomainModel.Models.Type1LeaseTransaction' does not implement interface member 'DomainModel.Abstract.ILeaseTransaction.Void'.
    'DomainModel.Models.Type1LeaseTransaction.Void' cannot implement 'DomainModel.Abstract.ILeaseTransaction.Void' 
    because it does not have the matching return type of 'DomainModel.Abstract.ILeaseTransactionVoid'.</p>
  </blockquote>
  
  <p>I guess the error makes sense since the return type isn't the interface itself even though it does implement the interface. I'm new to all this so I'm completely lost at this point.</p>
  
  <p>Is there any way for me to implement the nested interface property <code>ILeaseTransactionVoid</code> on <code>ILeaseTransaction</code>?</p>
  
  <p>Thank you!</p>