title: I'm missing something with this entity framework relationship
body: <p>We're using code first for our project. I have two tables, that when saving I get this error message:</p>
  
  <blockquote>
    <p>"Unable to determine the principal end of the 'PublicationSystem.Model.TaskAssignment_Task' relationship. Multiple added entities may have the same primary key."</p>
  </blockquote>
  
  <p>Here are the models:</p>
  
  <pre><code>[Table("TaskItem")]
  public class TaskItem
  {
      [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int TaskId { get; set; }
  
      //...
  
      public ICollection&lt;TaskAssignment&gt; Assignees { get; set; }
  }
  
  [Table("TaskAssignment")]
  public class TaskAssignment : BaseEntity
  {
      [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int TaskAssignmentId { get; set; }
  
      public int TaskId { get; set; }
  
      [ForeignKey("TaskId")]
      public TaskItem Task { get; set; }
  
      //...
  
  }
  </code></pre>
  
  <p>What am I missing?</p>