title: Repository fetching data only in some cases
body: <p>I have a ASPNET Boilerplate project; the piece of code below is executed both from a service and from a background job</p>
  
  <pre><code>    private readonly IRepository&lt;UserTeam&gt; _userTeamsRepository;
      [...]
      public List&lt;UserTeam&gt; GetUsers(){
          var defaultUsers = _userTeamsRepository
              .GetAllIncluding(ut =&gt; ut.Team, ut =&gt; ut.User)
              .Where(ut =&gt; ut.Team.AlwaysIncluded)
              .ToList();
      }
  </code></pre>
  
  <p>It fetches the data from a join table <code>UserTeam</code> between the <code>Users</code> table and a <code>Teams</code> table (one <code>User</code> belongs to multiple <code>Teams</code>, in one <code>Team</code> there can be multiple <code>Users</code>).</p>
  
  <p>As I said, the <code>GetUsers()</code> method is referenced both in a web service and in a background job.
  Using a breakpoint I can see that when the method is called in the web service the returned list is full of <code>UserTeam</code> entities containing both the linked <code>Team</code> and <code>User</code> entities (which is what I want).</p>
  
  <p>On the other hand, when it is called from the background job only the <code>Team</code> field is populated, while the<code>User</code> part is null.</p>
  
  <p>It is a very strange problem because the piece of code is the same and the only different thing is the fact that it is called in different contexts of the same application.</p>
  
  <p>Do you know anything that may be causing this issue?</p>
  
  <p>Thank you</p>