title: Foreign key between aggregate roots
body: <p>I understand the concept of aggregate root and I know that one aggregate root must reference another by identity ( <a href="http://dddcommunity.org/wp-content/uploads/files/pdf_articles/Vernon_2011_2.pdf" rel="noreferrer">http://dddcommunity.org/wp-content/uploads/files/pdf_articles/Vernon_2011_2.pdf</a> ) so what I don't get is how can I force Entity Framework to add a foreign key constraint between two aggregates?</p>
  
  <p>Lets suppose I have a simplified domain:</p>
  
  <pre><code>public class AggregateOne{
      [Key]
      public Guid AggregateOneID{ get; private set;}
      public Guid AggregateTwoFK{get; private set;}
      /*Other Properties and methods*/
  }
  
  public class AggregateTwo{
      [Key]
      public Guid AggregateTwoID{get; private set;}
      /*Other Properties and methods*/
  }
  </code></pre>
  
  <p>With this domain design, Entity Framework doesn't know that there is a relationship between AggregateOne and AggregateTwo and consequently there is no foreign key at the generated database.</p>