Guest User

Untitled

a guest
May 27th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. ctx.As.Select(a => new Thing
  2. {
  3. AId = a.Id,
  4. BNames = a.Bs.Select(x=>x.Name) //SubCollection
  5. })
  6.  
  7. [a].[Id] AS [AId] FROM [As] AS [a]
  8.  
  9. p_executesql N'SELECT [x].[Name]
  10. FROM [Bs] AS [x]
  11. WHERE @_outer_Id = [x].[AId]',N'@_outer_Id int',@_outer_Id=1
  12.  
  13. p_executesql N'SELECT [x].[Name]
  14. FROM [Bs] AS [x]
  15. WHERE @_outer_Id = [x].[AId]',N'@_outer_Id int',@_outer_Id=2
Add Comment
Please, Sign In to add comment