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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:28:03+00:00 2026-06-13T14:28:03+00:00

Quick question. Take the following method I wrote for my EF repository: public virtual

  • 0

Quick question. Take the following method I wrote for my EF repository:

public virtual IEnumerable<T> SelectWhere(Expression<Func<T, bool>> predicate)
{
    using (CAMHS_DB db = new CAMHS_DB())
    {
        return db.CreateObjectSet<T>().Where(predicate).ToList<T>();
    }
}

Will EF apply my predicate before it goes to the DB and use it to return only the records I asked for, or will it return everything then apply the predicate??

Thanks,
Wilky.

  • 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-13T14:28:04+00:00Added an answer on June 13, 2026 at 2:28 pm

    In your code sample, he’ll use the predicate as part of the select statement and select only the asked records.

    BUT, you should be aware that after you use the “ToList()” method, if you’ll take the returned value from this method and use the “Where” extension method on it, it’ll be against the data that already in the memory.

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

Sidebar

Related Questions

Quick question, I have the following string which is a coma separated list of
Quick question on Bitmap repeat x and y, i tried the following and it
quick question on GWT from a newbie. Considering the following code: FlowPanel block =
Just a really quick question relating to GitHubs function to take a README file
Quick domain question: A clients site: www.workingwardrobes.org, does not work if I take off
please take a quick look at this website I get the following error message
OK, this is just a quick question and I might take some slack for
Quick Question How does youtube encode theirs urls? take below http://www.youtube.com/watch?v=MhWyAL2hKlk what are they
quick question on declaring functions. Lets say I have the following code: class a{
SQL pivot question with a twist, Take the following table (note year and month

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.