title: One out of 2 properties should be null (EntityFramework Code First)
body: <p>I've searched a lot in the forum, but haven't found anything about regarding this issue.</p>
  
  <p>I have 2 properties in the EntityFramework Code First:</p>
  
  <pre><code>    [Column(TypeName = "Money")]
      public decimal? Debit { get; set; }
      [Column(TypeName = "Money")]
      public decimal? Credit { get; set; }
  </code></pre>
  
  <p>One of them should be not null, but the other one should be null
  Examples:</p>
  
  <pre><code>Debit=null;
  Credit=34;
  
  Debit=45;
  Credit=null;
  </code></pre>
  
  <p>On the other hand, it should not be possible to set both or none of them null.
  Is it possible to handle this issue with data annotations or should I solve it with a workaround?</p>
  
  <p>Best regards!</p>