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

The Archive Base Latest Questions

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

My app consolidates data from other DBs for reporting purposes. We can’t link the

  • 0

My app consolidates data from other DBs for reporting purposes. We can’t link the databases, so all the data processing has to be done in code – this is fine as we want to allow manual validation during the imports.

Certain users will be able to start an update through the Silverlight 4 front end.

I have 3 tables in database x that are fed from one EF4 Model (ModelX). I want to join those tables together, select specific columns and return the result as a new entity that exists in a different EF4 Model (ModelY). I’m using this query:

var myQuery = from i in DBx.table1 from it in DBx.table2 from h in DBx.table3 where (i.id==it.id && h.otherid == i.otherid) select new ModelYServer {Name = i.name,Thing = it.thing, Stuff = h.stuff};

The bit i’m stuck on, is how to execute that query, and wait until the Asynchronous call has completed. Normally, i’d use:

DomainContext.Load<T>(myQuery).Completed += (sender,args) =>
{List<T> myList = ((LoadOperation<T>)sender.Entities.ToList();};

but I can’t pass myQuery (an IEnumerable) into the DomainContext.Load() as that expects an EntityQuery. The dataset is very large, and is taking up to 30 seconds to return, so I definitely need to wait before continuing.

So can anyone tell me how I can wait for the IEnumerable query to complete, or suggest a better way of doing this (there very likely is one).

Thanks

Mick

  • 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:47:16+00:00Added an answer on May 26, 2026 at 12:47 pm

    One simple way is just to force it to evaluate by calling ToList:

    var query = from i in DBx.table1
                join it in DBx.table2 on i.id equals it.id
                join h in DBx.table3 on i.otherid equals h.otherid
                select new ModelYServer {
                    Name = i.name,
                    Thing = it.thing,
                    Stuff = h.stuff
                };
    // This will block until the results have been fetched
    var results = query.ToList();
    
    // Now use results...
    

    (I’ve changed your where clause into joins on the earlier tables, as that’s what you were effectively doing and this is more idiomatic, IMO.)

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

Sidebar

Related Questions

The app I'm developing needs to be able to pull from several different data
App having screen1, screen2, screen3 , screen4 user can go to screen3 from remaining
The app that I'm working on has a URL that it accesses for data,
My app got rejected by Apple three times, all with the same rejection letter,
I'm currently working on a Silverlight app and need to convert XML data into
what technology can i use to manage unstable internet connection in a Server-Client App.
My app makes several calls to getFromLocationName from the android.location.Geocoder; class, this is currently
I want to write an app that consolidates/aggregates multiple email accounts (e.g., att.net and
Problem ASP.NET has no concept of associating permissions to roles. My app Current web
App doesn't load an Image from an HTTPS URL when run on the emulator.

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.