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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:23:21+00:00 2026-05-13T16:23:21+00:00

I have a lite problem i don’t really know how to fix. In my

  • 0

I have a lite problem i don’t really know how to fix. In my example below i would like to select a list of ProductCategories with ProductItems that are active.

public IEnumerable<ProductCategory> ListProductCategories()
        {
            return _entities.ProductCategorySet.Include("ProductItems").Where(x => x.ProductItems.Active == true).ToList();               
        }

The problem is that i can’t access productItem property Active in my lambda expression, what is the problem? Do I think totaly wrong when im trying to write a linq query like the one above?

  • 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-13T16:23:21+00:00Added an answer on May 13, 2026 at 4:23 pm

    There could be more than one item. You probably want to select the categories where all items are active:

    return _entities.ProductCategorySet
                    .Include("ProductItems")
                    .Where(x => x.ProductItems.All(item => item.Active))
                    .ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have found C++ FQA Lite very edificatory and would like to read more
It seems I have a problem with JQuery Lite Content Slider. I get a
I have this flash animation (flash lite 1.1) and the problem is that on
I have problem loading Flash Lite plugin on N8 I have simple QWidget with
I have a problem with my cursor which I know the error of, but
I have Firebug Lite running in IE9 testing my website and for some reason
I have a Mojolicious Lite script that gives out an executable file (user can
I have a Full and Lite applications that were built from the same code.
I have downloaded xampp-win32-1.7.7-usb-lite.7z and unzip it to C drive in my VirtualBox. Then
I have written a code to insert the data to SQL LITE database as

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.