title: same key value for is already being tracked
body: <pre><code>System.InvalidOperationException: The instance of entity type 'ProjectAssignment' cannot be tracked because another instance with the same key value for {'ProjectID'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the conflicting key values.
     at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.IdentityMap`1.Add(TKey key, InternalEntityEntry entry)
     at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.St
  </code></pre>
  
  <p>I made a project with Worker (ID and other columns) And Project (ID and other columns) Entity and ProjectAssignment (many Project ID to many Workers) Crossbound. But error in Application Insights appears when I try to fetch ProjectAssignment data. Strange that id does not appear earlier. </p>
  
  <p>Here it is <a href="https://github.com/Streamc/ContosoObserve1/tree/master/Proj_s" rel="noreferrer">https://github.com/Streamc/ContosoObserve1/tree/master/Proj_s</a></p>
  
  <pre><code> context.Database.EnsureCreated();
  
    var ProjectAssignments = new ProjectAssignment[]
               {
                      new ProjectAssignment
                      {
                          ProjectID = Projects.Single( i =&gt; i.ID == 1).ID,
                          WorkerID = Workers.Single( i =&gt; i.ID == 1).ID,
                      },
                       new ProjectAssignment
                      {
                          ProjectID = Projects.Single( i =&gt; i.ID == 1).ID,
                          WorkerID = Workers.Single( i =&gt; i.ID == 2).ID,
                      },
                       new ProjectAssignment
                      {
                          ProjectID = Projects.Single( i =&gt; i.ID == 1).ID,
                          WorkerID = Workers.Single( i =&gt; i.ID == 3).ID,
                      },
                      new ProjectAssignment
                      {
                          ProjectID = Projects.Single( i =&gt; i.ID == 2).ID,
                          WorkerID = Workers.Single( i =&gt; i.ID == 1).ID,
                      },
                      new ProjectAssignment
                      {
                          ProjectID = Projects.Single( i =&gt; i.ID == 3).ID,
                          WorkerID = Workers.Single( i =&gt; i.ID == 1).ID,
                      },
                      new ProjectAssignment
                      {
                          ProjectID = Projects.Single( i =&gt; i.ID == 4).ID,
                          WorkerID = Workers.Single( i =&gt; i.ID == 1).ID,
                      },
                      new ProjectAssignment
                      {
                          ProjectID = Projects.Single( i =&gt; i.ID == 2).ID,
                          WorkerID = Workers.Single( i =&gt; i.ID == 2).ID,
                      },
                      new ProjectAssignment
                      {
                          ProjectID = Projects.Single( i =&gt; i.ID == 2).ID,
                          WorkerID = Workers.Single( i =&gt; i.ID == 3).ID,
                      },
                      new ProjectAssignment
                      {
                          ProjectID = Projects.Single( i =&gt; i.ID == 2).ID,
                          WorkerID = Workers.Single( i =&gt; i.ID == 4).ID,
                      }
  
               };
              foreach (ProjectAssignment ss in ProjectAssignments)
              {
                  context.ProjectAssignments.Add(ss);
              }
              context.SaveChanges();
  
  
  
   public class ProjectAssignment
      {
          [Key]
          public int ProjectID { get; set; }
          public int WorkerID { get; set; }
  
  
          public Project Project { get; set; }
          public Worker Worker { get; set; }
  
      }
     public class Worker
      {
          public int ID { get; set; }
          public string Firstname { get; set; }
          public string Lastname { get; set; }
          public string Fathername { get; set; }
          public string email { get; set; }    
          public string Company_name { get; set; }
          public ICollection&lt;ProjectAssignment&gt; ProjectAssignment { get; set; }
  
      }
      public class Project
      {
          public int ID { get; set; }
          public string Name { get; set; }
          public string Customer_Company { get; set; }
          public string Executive_Company { get; set; }
          public int ManagerID { get; set; }    
          public int WorkerID { get; set; }    
          public DateTime Begin_date { get; set; }
          public DateTime End_date { get; set; }
          public int Priority { get; set; }    
          public string Test_comment { get; set; }    
          public ICollection&lt;ProjectAssignment&gt; ProjectAssignment { get; set; }
      }
  </code></pre>