title: C# EF6 Groupjoin on stored procedure
body: <p>I try to do a GroupJoin on a stored procedure with entity framework 6.
  This group join is working on Entity but on stored procedure I get an exception with this message : </p>
  
  <blockquote>
    <p>"An error occurred while preparing the command definition. See the inner exception for details." and inner exception "The nested query does not have the appropriate keys.".</p>
  </blockquote>
  
  <p>My stored procedure key is a <code>Nullable</code> int but I specified that <code>Entity Framework</code> need to use key.Value.</p>
  
  <p>I don't understand where is the problem.</p>
  
  <pre><code>var test = contextEF.MyStoredProcedur(varInt)
  .GroupJoin(contextEF.LinkedEntity, p =&gt; p.EntityId.Value, s =&gt; s.EntityId, (p, s) =&gt; new { p = p, s = s.ToList() }).ToList();
  
  var test2 = contextEF.MyEntity
  .GroupJoin(contextEF.LinkedEntity, p =&gt; p.EntityId.Value, s =&gt; s.EntityId, (p, s) =&gt; new { p = p, s = s.ToList() }).ToList();
  </code></pre>
  
  <p>test is not working. test2 is working</p>