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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:49:09+00:00 2026-05-22T23:49:09+00:00

I searched a bit and understands that I can use projection to partially load

  • 0

I searched a bit and understands that I can use projection to partially load an entity , the question becomes is there a way to partially eager loading a child?
Say I have the following

Entity A has

Id
Name
EntityB

and Entity B has

Id
StuffToBeLoaded1
StuffToBeLoaded2
OtherStuffNotToBeLoaded

How can I load A with B , and B only has stuffToBeLoaded1 and stuffToBeLoaded2?
I guess I cannot call .Inlucde(“EntityB”) otherwise it is fully loaded, is it?

  • 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-22T23:49:10+00:00Added an answer on May 22, 2026 at 11:49 pm

    You must use custom query with a projection. If EntityB property represents collection you can use something like:

    var query = from a in context.EntitiesA
                select new 
                   {
                      a.Id,
                      a.Name,
                      Bs = a.EntityB.Select(b => new { 
                           b.StuffToBeLoaded1, 
                           b.StuffToBeLoaded2 
                      })
                   };
    

    If EntityB is not a collection navigation property you can simply use:

    var query = from a in context.EntitiesA
                select new 
                   {
                      a.Id,
                      a.Name,
                      a.EntityB.StuffToBeLoaded1, 
                      a.EntityB.StuffToBeLoaded2 
                   };           
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've searched a bit but can't seem to find a good resource that gives
I've searched a bit and didn't see any similar question, so here goes. How
I apologize if this is a duplicate question, I searched a bit and couldn't
I have searched a bit upon it but can't get it to work properly.
I've searched a bit, but I'm not sure how to write the question to
I've searched a bit, but I can't seem to find any information on the
I have searched a bit on google, but didn't really found an answer to
I have searched a bit around for a pager for fragment , I develop
Is it possible to add new codec's to ffmepg? i searched a bit and
I want to change the brightness of an NSImage . I've searched a bit

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.