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

  • Home
  • SEARCH
  • 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 3692724
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:17:42+00:00 2026-05-19T04:17:42+00:00

Case can have many Replies and one User, Replies can have one Case and

  • 0

Case can have many Replies and one User, Replies can have one Case and one User, One User can have many Replies and many Cases.

ObjectSet <= Case Object (IDbSet)

ObjectSet.Include(x => x.User).Include(x => x.Replies).FirstOrDefault(x => x.Id == caseId);

But the User Object for each Reply are not included? Only the User object for Case is Included?

How would I include the User objects for the Replies too?

Thanks in advance!

  • 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-19T04:17:42+00:00Added an answer on May 19, 2026 at 4:17 am

    You could try something like that:

    ObjectSet.Include(x => x.User)
             .Include(x => x.Replies.Select(r => r.User))
             .FirstOrDefault(x => x.Id == caseId);
    

    If it doesn’t work, try to specify the include as a string:

    ObjectSet.Include(x => x.User)
             .Include("Replies.User")
             .FirstOrDefault(x => x.Id == caseId);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables, users and groups . A user can belong to many
Say we have this scenario: Artist ==< Album ==< Track //ie, One Artist can
I have a nested Form A Crew can have many meetings, a Meeting can
On a Use Case diagram can you show things that an actor cannot do,
Can fogbugz track case dependencies?
I can't figure out a use case for being able to annotate interfaces in
How can I compare strings in a case insensitive way in Python? I would
I can't quite figure out this syntax problem with a case expression in a
Can it be known in general whether or not placing a case within a
How can I make this work? switch(property.PropertyType){ case typeof(Boolean): //doStuff break; case typeof(String): //doOtherStuff

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.