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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:17:55+00:00 2026-06-14T01:17:55+00:00

I have two tables which are in a relationship. They are called tblX and

  • 0

I have two tables which are in a relationship. They are called tblX and tblY.

var x = (from v in db.tblX select v).First();

Now x has these properties:

x.name
x.id
x.tblY

tblY has these properties: idY, nameY.

After I use the linq statement above, I can get to idY without making a join. I can access x.tblY.idY and x.tblY.nameY. Is it ok if I access them like this? Is it a good programming practise?

  • 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-14T01:17:56+00:00Added an answer on June 14, 2026 at 1:17 am

    tblY’s properties will be loaded lazily. It is fine unless you do this operation repeteadly for big numbers of tblX objects. Than you might consider eager loading.

    Related: Entity Framework – what's the difference between using Include/eager loading and lazy loading?

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

Sidebar

Related Questions

I have two tables Department Professor in which Department has an attribute called HeadID
I have a two tables which are linked by a one-to-many relationship. Now I
I have two different tables from which I need to pull data blogs which
I have two tables in my database which have a one-to-one relationship. I want
I have two tables: Person and Shift Person has as lookup field which is
I have a table called user_relationship. which has two foreign keys refering back to
I have two tables User and UserRole which are they connected using a link
I have two tables. They're in a 1:N relationship. Tasks - Id - Name
I have two tables with a many to one relationship which represent lots and
i have two tables: Authority , Permission they have many to many relationship class

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.