title: EF7 beta6: Error saving multiple entities
body: <p>I am creating an API using ASP.NET5 and Entity Framework 7.0.0-beta 6, and when I try to execute various updates in several requests, I get this Exception:</p>
  
  <p><em>'Company' cannot be tracked because another instance of this type with the same key is already being tracked. For new entities consider using an IIdentityGenerator to generate unique key values.</em></p>
  
  <p>This is my code:</p>
  
  <pre><code>public class MrBellhopContext : DbContext
  {
  
      public DbSet&lt;Company&gt; Company { get; set; }
  
      protected override void OnModelCreating(ModelBuilder modelBuilder)
      {
          modelBuilder.Entity&lt;Company&gt;(entity =&gt;
          {
              entity.Key(c =&gt; c.CompanyId);
  
              entity.Index(c =&gt; c.Name);
  
              entity.Property(c =&gt; c.CompanyId).ValueGeneratedOnAdd();
          });
  
          modelBuilder.UseSqlServerIdentityColumns();
  
          base.OnModelCreating(modelBuilder);
      }
  
  }
  
  
  public class Company
  {
  
      public int CompanyId { get; set; }
  
      public string Name { get; set; }
  
      public string Description { get; set; }
  
      public string Phone { get; set; }
  
      public string Email { get; set; }
  
      public short StatusId { get; set; }
  
  }
  
  
  public class CompanyRepository : ICompanyRepository
  {
  
      MrBellhopContext _dbcontext;
  
  
      public async Task UpdateAsync(Company company)
      {
          _dbcontext.Update(company);
          await _dbcontext.SaveChangesAsync();
      }
  }
  
  
  
  [Route("api/[controller]")]
  public class CompanyController : Controller
  {
  
  
      [HttpPut]
      public async void UpdateAsync([FromBody] Company company)
      {
          if ((!ModelState.IsValid) || (company == null))
          {
              Context.Response.StatusCode = 400;
              return;
          }
          else
          {
              await _repository.UpdateAsync(company);
          }
      }
  
  }
  </code></pre>
  
  <p>I have tried to solve it by removing <em>ValueGeneratedOnAdd()</em>, <em>UseSqlServerIdentityColumns()</em> or changing the mapping, but if I try to update several entities in several requests, I get the Exception:</p>
  
  <ol>
  <li>First req: Update CompanyId 8</li>
  <li>First req: Update CompanyId 9  !! ERROR</li>
  </ol>
  
  <p><strong>Does anyone know how to solve this issue?</strong></p>