title: How to only get one level deep with EntityFramework 5 on navigation properties?
body: <p>Right now I have proxy creation disabled:</p>
  
  <pre><code>context.Configuration.ProxyCreationEnabled = false;
  </code></pre>
  
  <p>I have a data model like so (removed non-relevant fields):</p>
  
  <pre><code>public partial class Video
  {    
      public int VideoID { get; set; }
      public string Title { get; set; }
      public int UserID { get; set; }
  
      public virtual User User { get; set; }
  }
  
  public partial class User
  {
      public User()
      {
          this.Videos = new HashSet&lt;Video&gt;();
      }
  
      public int UserID { get; set; }
      public string Username { get; set; }
  
      public virtual ICollection&lt;Video&gt; Videos { get; set; }
  }
  </code></pre>
  
  <p>I am using Unit of Work and Repository patterns to load my data like so,</p>
  
  <p>Get all video's, including the user object:</p>
  
  <pre><code>var videos = videoService
                  .Include(v =&gt; v.User)
                  .Get()
  </code></pre>
  
  <p>I am using automapper to map from data model to domain model (hence the UI namespace in the screenshot below).  When I inspect the video enumeration I get back, and look at the first item in the enumeration, I go to check the user object:</p>
  
  <p><img src="https://i.stack.imgur.com/vQrjx.png" alt="enter image description here"></p>
  
  <p>What I <strong>expect</strong> here is the VideoModel to be filled with data(ok), with only it's single UserModel entity to be filled with data(ok), and all collections in the UserModel to be empty(this is broke).  As you can see in the second red box above, the Videos collection is populated with 6 videos.  And on those video's, the user's are filled in.  So this basically creates a very large object graph.</p>
  
  <p><strong>1) Can I make it so when using an include that it ONLY goes 1 level deep (IE doesn't fill in Video.User.Videos)?
  <br/><br/>
  2) Why doesn't ProxyCreationEnabled = false take care of this?  Am I expecting too much?</strong></p>
  
  <p>p.s. I want to avoid creating a customer mapper for this with automapper.
  p.p.s. I am doing db first, not model first</p>