Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8341507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:30:10+00:00 2026-06-09T05:30:10+00:00

Given a LINQ to Entity query with an outer join… var query = from

  • 0

Given a LINQ to Entity query with an outer join…

var query = from items in entityDb.TableName
         join requestedBy in entityDb.People on items.RequestedById equals requestedBy.PersonId into requestedByOuter
         from requestedBy in requestedByOuter.DefaultIfEmpty()
         select items;

What does the compiled (Lamba expressions) version of such an outer join look like? Is there any way to see this in the visual studio debugger?

UPDATE
To clarify, Jon Skeet explains in his book that query expressions are “compiler translated” to normal C# code before doing “real compilation”. My question is how is the query expression translated to real C# in the case of outer joins? And, can we see these translations in the debugger or by some other means?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:30:13+00:00Added an answer on June 9, 2026 at 5:30 am

    The following statement:

    from u in TblUsers
    join c in TblCompanies on u.FkCompanyID equals c.PkCompanyID into g
    from x in g.DefaultIfEmpty()
    select u
    

    Would result in this lamba expression (according to the excellent application LINQPad):

    TblUsers
       .GroupJoin (
          TblCompanies, 
          u => u.FkCompanyID, 
          c => c.PkCompanyID, 
          (u, g) => 
             new  
             {
                u = u, 
                g = g
             }
       )
       .SelectMany (
          temp0 => temp0.g.DefaultIfEmpty (), 
          (temp0, x) => temp0.u
       )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a LINQ query below: var data= (from p in _db.P join
Going from the example given here... http://ericswann.org/blog/archive/2009/04/06/linq-to-sql-datacontext-provider-revisited.aspx I'm trying to use the datacontext between
I'm having trouble building an Entity Framework LINQ query whose select clause contains method
I'm making a query with Linq, backed by an Entity Framework datasource. I'm getting
I'm trying to only return a few columns from a linq to sql query
i have this query: var model2 = (from p in context.ViewChatPeoples where ((IQueryable<int>)(from q
Given that directly exposing linq to sql or entity framework classes over web services
Any ideas why does the entity framework in LINQ gives following strange error: Unable
Is it possible to get all 7 days for a given date using linq
I have an odd linq subquery issue. Given the following data structure: Parents Children

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.