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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:42:01+00:00 2026-05-27T13:42:01+00:00

In SQL I can use the IN operator: select * from project where id

  • 0

In SQL I can use the IN operator:

select * from project where id IN (select f.id_project from funds)

How can I convert this statement to LINQ?

Controller.Project.Where(p => p.id == id_funds); // I can assign only one id funds
  • 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-27T13:42:01+00:00Added an answer on May 27, 2026 at 1:42 pm

    Use the Contains method:

    Controller.Project.Where(p => id_funds.Contains(p.id));
    

    Don’t think it applies to your question as it appears id_funds links to a db table but…
    Note that if id_funds is an object (i.e. a simple array or list etc.), not something in the database and you’re not using Linq-To-Objects you may encounter issues with this as i don’t think Linq-To-Entities before v 4.0 supports it (see here for a workaround), and Linq-To-SQL has problems if id_funds is a very large list (more than around 2000 items).

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

Sidebar

Related Questions

In SQL you can use SELECT * FROM INFORMATION_SCHEMA.TABLES etc to get information about
I am wondering if you can use Linq to SQL using a .mdf file
Anyone have a PL-SQL statement that i can use to generate database & tables
In SQL Server 2017, you can use this syntax, but not in earlier versions:
How can I use LIKE operator with the OR operator in SQL Server 2005?
I have the following SQL query: select expr1, operator, expr2, count(*) as c from
In SQL Server you can use the IsNull() function to check if a value
In SQL server you can use the DATENAME function to get the day of
In SQL Server you can use an XML datatype and map it to relational
I can use the sql server management studio to open a sqlserver 2000 database,

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.