title: Why do I get an error if I have 1 dbContext with multiple dbSets when calling SaveChanges twice?
body: <p><strong>EDIT</strong></p>
  
  <p>I'm new to MVC and Entity Framework. </p>
  
  <ol>
  <li>My first table (Participant) was created using the EF functionality Code First. </li>
  <li>The second table (Status) was created manually - directly in the DB + I wrote its Model class.</li>
  <li>Then I updated my DbContext class.</li>
  </ol>
  
  <p><strong>UPDATED CODE</strong></p>
  
  <pre><code>public class Participant
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public DateTime RegistrationDate { get; set; }
      public string ClubName { get; set; }
      public string Email { get; set; }
      public string Weight { get; set; }
      public string BeltColor { get; set; }
  
      public virtual ICollection&lt;Status&gt; Statuses { get; set; }
  }
  
  
  public class Status
  {
      public int Id { get; set; }
      public int Participant_Id { get; set; }
      public string Status_Text { get; set; }
      public DateTime Status_DateTime { get; set; }
  }
  
  
  public class BjjDBContext : DbContext
  {
      public BjjDBContext()
          : base("DefaultConnection")
      {
      }
  
      public DbSet&lt;Participant&gt; Participants { get; set; }
      public DbSet&lt;Status&gt; Statuses { get; set; }
  }
  </code></pre>
  
  <p>So after completing the steps above (tables, models, dbsets), I try to call the Create method in my Controller class. But I get a 'DbUpdateException was unhandled by user code'-exception when calling SaveChanges():</p>
  
  <pre><code>[HttpPost]
  [ValidateAntiForgeryToken]
  public ActionResult Create(Participant participant, Status status)
  {
      if (ModelState.IsValid)
      {
          participant.RegistrationDate = DateTime.Now;
          db.Participants.Add(participant);
          db.SaveChanges();
  
          status.Participant_Id = participant.Id;
          status.Status_DateTime = DateTime.Now;
          status.Status_Text = "Registration Pending";
  
          db.Statuses.Add(status);
          db.SaveChanges(); // Where the DbUpdateException-exception happens
  
          return RedirectToAction("Index");
      }
      return View(participant);
  }
  </code></pre>
  
  <p>Error description:</p>
  
  <blockquote>
    <p>An exception of type
    'System.Data.Entity.Infrastructure.DbUpdateException' occurred in
    EntityFramework.dll but was not handled in user code</p>
    
    <p>Additional information: An error occurred while updating the entries.
    See the inner exception for details.</p>
  </blockquote>