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 7055727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:47:00+00:00 2026-05-28T03:47:00+00:00

Currently I’m running some code and got some question about this. Below are the

  • 0

Currently I’m running some code and got some question about this. Below are the code listings of two LINQ to Entites queries.

Code listing A:

IQueryable list = 
    from tableProject in db.Project 
    select new {StaffInCharge = (
        from tableStaff in db.Staff
        where tableStaff.StaffId == tableProject.StaffInChargeId 
        select tableStaff.StaffName)};

Code listing B:

IQueryable list = 
    from tableProjectin db.Project 
    join tableStaff in db.Staff
        on tableProject.StaffInChargeId
        equal tableStaff.StaffId
    select new {StaffInCharge = tableStaff.StaffName};

What I want to figure out is which one will be better and faster if I have to select many column from many others table.

Thanks.

  • 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-05-28T03:47:01+00:00Added an answer on May 28, 2026 at 3:47 am

    this is the comment from @Tim Schmelter

    “The article(actually my SO-Question) relates to LINQ-To-DataSet what is based on LINQ-To-Objects. Linq to SQL or Linq to Entities might be optimized by the DBMS in that way that a where clause has the same performance as a join.”

    and the link is
    Why is LINQ JOIN so much faster than linking with WHERE?
    i think it is very useful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I'm doing some unit tests which are executed from bash. Unit tests are
Currently I know of only two ways to cache data (I use PHP but
Currently I am debugging the signing of an Android app. And this would be
Currently i'm having trouble using two functions in my -(void)viewDidLoad , both of these
Currently I have a web service running in a tomcat (http:// localhost:8080/myApp/getUsers ). My
Currently I have in my code tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(addCompoundToLabel:)]; My code
I am currently running into a problem where an element is coming back from
Currently my server is running of the Tomcat 5.5.26 and JDK 1.5.15. Now I
Currently I have 2 web applications app1 and app2 running on Tomcat 6: app1
Currently, working with RC0 Denali, having some issues I am attempting to review data

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.