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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:31:23+00:00 2026-05-26T12:31:23+00:00

We currently have a production application that runs as a windows service. Many times

  • 0

We currently have a production application that runs as a windows service. Many times this application will end up in a loop that can take several hours to complete. We are using Entity Framework for .net 4.0 for our data access.

I’m looking for confirmation that if we load new data into the system, after this loop is initialized, it will not result in items being added to the loop itself. When the loop is initialized we are looking for data “as of” that moment. Although I’m relatively certain that this will work exactly like using ADO and doing a loop on the data (the loop only cycles through data that was present at the time of initialization), I am looking for confirmation for co-workers.

Thanks in advance for your help.

//update : here’s some sample code in c# – question is the same, will the enumeration change if new items are added to the table that EF is querying?

IEnumerable<myobject> myobjects = (from o in db.theobjects where o.id==myID select o);
foreach (myobject obj in myobjects)
{
    //perform action on obj here
}
  • 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-26T12:31:23+00:00Added an answer on May 26, 2026 at 12:31 pm

    It depends on your precise implementation.

    Once a query has been executed against the database then the results of the query will not change (assuming you aren’t using lazy loading). To ensure this you can dispose of the context after retrieving query results–this effectively “cuts the cord” between the retrieved data and that database.

    Lazy loading can result in a mix of “initial” and “new” data; however once the data has been retrieved it will become a fixed snapshot and not susceptible to updates.

    You mention this is a long running process; which implies that there may be a very large amount of data involved. If you aren’t able to fully retrieve all data to be processed (due to memory limitations, or other bottlenecks) then you likely can’t ensure that you are working against the original data. The results are not fixed until a query is executed, and any updates prior to query execution will appear in results.

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

Sidebar

Related Questions

Currently I have one monitor application in production. The job of this monitor is
I have an existing asp.net application that is currently in production for more than
I have recently started work on an application that is already deployed to production.
currently all my application that is released is always release in production. However I
I have an ASP.NET 4 application that has been in production for years running
We currently have a production application used by about 400 people. The application used
Currently I'm working on Inventory Management application (later on this can be integrated with
I have a Rails (3.1.3 with asset pipeline) application that will be deployed as
I have an monotouch application that includes an objective-c static library. The application runs
I have an ASP.NET application that I am currently developing in C#. The application

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.