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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:07:47+00:00 2026-06-12T07:07:47+00:00

I have structure like this class Lesson { List<Sign> signs { get; set; }

  • 0

I have structure like this

class Lesson {
    List<Sign> signs { get; set; }
}

class Sign {
    List<Media> media { get; set;}
}

class Media {

}

Now I’m using this LINQ to get all lessons

var items = (from lesson in this.db.Lesson.Include("Sign")
                     where lesson.module_id == param
                     select lesson);

It works fine but signs list has ampty media list. I mean that attribute media in each object Sign equals null. What do I need to do to include media objects for each Sign ? Whole data is kept in database

  • 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-12T07:07:47+00:00Added an answer on June 12, 2026 at 7:07 am

    You’d use db.Lesson.Include("signs.media").

    The argument to ObjectQuery<T>.Include is a property path, not just a single root property. Note that with “signs.media” you wouldn’t need to also include “signs” separately:

    Paths are all-inclusive. For example, if an include call indicates Include(“Orders.OrderLines”), not only will OrderLines be included, but also Orders.

    (You should adjust your property names to conform to .NET framework conventions, by the way, so you’d end up with “Signs.Media”.)

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

Sidebar

Related Questions

I would like to have a structure like this: Mapping class int ID {get;set;}
I have a object structure like this: public class Entity { IList<Relationship> Relationships{get;set;} }
I have structure like this. public class ExportStructure { public string issueid { get;
I have a files structure like this: Class (folder): - User.php - Rule.php Scripts
I have structure like this. <ul class=gallerylist> <li> <image ...> <input ...> </li> <li>
I have a hierarchical structure like this: class Node { Node Parent; string Name;
i have a data structure like this public class Employee { public string Name
I have an Class structure like this: class A { Dictionary<UInt64, B> listB; method1(){}
I have a class structure that looks like this: class Person { public virtual
Assuming I have a simple structure that looks like this: public class Range {

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.