title: How to force Entity Framework to map `internal` navigation properties?
body: <p>Using <code>Code First</code> with <code>EF 5.0</code> I have the followings:</p>
  
  <pre><code>internal class Entities : DbContext
  {
      public DbSet&lt;User&gt; Users { get; set; }
      public DbSet&lt;Project&gt; Projects { get; set; }
  }
  
  // User class which holds a list of 'Project' class
  public class User
  {
      private List&lt;Project&gt; _projects = new List&lt;Project&gt;();
  
      public int Id { get; set; }
      internal List&lt;Project&gt; Projects
      {
          get { return _projects; }
          set { _projects = value; }
      }
  }
  
  // Project class which holds a list of 'Milestone' class
  public class Project
  {
      private List&lt;Milestone&gt; _milestones = new List&lt;Milestone&gt;();
  
      public int Id { get; set; }
      public string Title { get; set; }
      internal List&lt;Milestone&gt; MileStones
      {
          get { return _milestones; }
          set { _milestones = value; }
      }
  }
  </code></pre>
  
  <p>Although EF has created tables and relations correctly (one-to-many for: User=>Project=>Milestone) if I create a user with some projects and add it to <code>DbContext</code>, only the user will be added to and his projects won't. Same for a user with projects which have milestones. I'm doing it this way:</p>
  
  <pre><code>public void AddUser(User user)
  {
      using (var repository = new Entities())
      {
          repository.Users.Add(user);
          repository.SaveChanges();
      }
  }
  </code></pre>
  
  <p>My Question is how to force <code>EF</code> to INSERT or UPDATE complex entities automatically (cascading), hence adding a user with a list of projects, INSERTs the user in USERS table and his projects in PROJECTS table automatically (with correct relation)?</p>
  
  <p>Is <code>EF</code> that smart in it's 5th version or I should do it manually?</p>