title: Create Foreign Key using Data Annotations
body: <p>In the code below, I need to set a foreign key constrant on ParentInfoAddProperties.ParentQuestionAnswersId so that it is dependent on ParentQuestionAnswers.Id (which is a Primary Key).  I am attempting to do so using data annotations but Entity Framework 6 wants to create a new Foreign Key column in my ParentQuestionAnswers table which references the ParentInfoAddProperties.Id column not the ParentInfoAddProperties.ParentQuestionAnswersId column.  I do not want Entity Framework to create a new foreign key column.</p>
  
  <p>I'd greatly appreciate if someone can explain what data annotations or (if necessary) fluent mappings I should specify to achieve the desired foreign key constrant.  Thanks in advance.</p>
  
  <pre><code>namespace Project.Domain.Entities
  {  
      public class ParentQuestionAnswers
      {
          public ParentQuestionAnswers()
          {
              ParentInfoAddProperties = new ParentInfoAddProperties();
          }
  
          [Required]
          public int Id { get; set; }
  
          [Required]
          public int UserId { get; set; }
  
          public ParentInfoAddProperties ParentInfoAddProperties { get; set; }
      }
  
      public class ParentInfoAddProperties
      {
          [Required]
          public int Id { get; set; }
  
          [Required]
          public int ParentQuestionAnswersId { get; set; }
      }
  }
  </code></pre>