title: EntityFramework adding new object to a collection
body: <p>Probably this question has been answered before, if that's the case I would appreciate if you guys point me in the right direction.</p>
  
  <p>I would like to know what happens when a new object is added to an EntityFramework collection.</p>
  
  <p>More precisely, I'd like to know if in order to add the new object the whole collection is loaded into memory</p>
  
  <p>For example:</p>
  
  <pre><code>public class MyContext : DbContext
  {
      public DbSet&lt;Assignment&gt; Assignments { get; set; }
  }
  
  public class SomeClass
  {
      public void AddAssignment(Assignment assignment)
      {
          var ctx = new MyContext();
  
          ctx.Assignments.Add(assignment);
  
          ctx.SaveChanges();
      }
  }
  </code></pre>
  
  <p>Do all the assignment records have to be loaded into memory just to perform a simple insert???</p>