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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:51:49+00:00 2026-06-02T09:51:49+00:00

I asked very similar question here Entity framework – select by multiple conditions in

  • 0

I asked very similar question here
Entity framework – select by multiple conditions in same column – referenced table

Now relationship is Many to Many.
So I have 3 tables: order, items and orderItem (items is a Junction table)
Again.. I want to select all orders that have at least one orderItem with price 100 and at least one orderItem with price 200

I really don’t know how to edit this for that scenario.

var orders = from o in kontextdbs.orders
             select o;
foreach(int value in values)
{    
      int tmpValue = value;
      orders = orders.Where(x => kontextdbs.order_item.Where(oi => x.id == oi.order_id)
} 
  • 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-02T09:51:52+00:00Added an answer on June 2, 2026 at 9:51 am

    Here is the modified version

    foreach(int value in values)
    {    
          int tmpValue = value;
          orders = orders.Where(x => (from oi in kontextdbs.order_item
                                     join i in kontextdbs.items on oi.item_id equals i.id
                                     where x.id == oi.order_id
                                     select i).Any(y => y.price == tmpValue));    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've asked a very similar question before for a video renderer filter. See here:
This question is very similar to the question asked here so I hope this
I'm afraid very similar question has been asked already here , but for some
Liu Chang asked a very similar question to this one here, Linux equivalent of
This question is very similar to an earlier question I asked ( This Question
I know that my question will be very similar to other ones already asked
First up, my question is very similar to questions asked in Stackoverflow (and the
This is very similar to a question I asked the other day but my
I've asked very similar question before and should have mentioned more detailed. Last time
This is very similar to a question I asked the other day but my

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.