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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:25:19+00:00 2026-06-11T08:25:19+00:00

I have a Silverlight app using mvvm with ria services. I have a textbox

  • 0

I have a Silverlight app using mvvm with ria services. I have a textbox on the view that the user puts in a Job Number and clicks find. This find button is using the ICommand in xaml to go here..

public ICommand FindJob
{
    get
    {
        return new DelegateCommand(BeginFindJob, (o) => true);
    }
}

public void BeginFindJob(object o)
{
    if (!IsDesignTime)
    {
        IsLoading = true;
        string jobnum = o.ToString();
        OnPropertyChanged("IsLoading");
        LoadOperation<Job> loadOp = _context.Load<Job>(_context.GetJobsByJobNumQuery(jobnum));
        loadOp.Completed += new EventHandler(loadOp_Completed);
    }
}

It uses the GetJobsByJobNumQuery in my ria service like so..

public IQueryable<Job> GetJobsByJobNum(string JobNum)
{
    var query = ((from j in this.ObjectContext.Jobs
                  where j.JobNumber == JobNum
                  select j) as ObjectQuery<Job>).Include("JobHeadings").Include("JobContracts").Include("JobTags").Include("JobMarket"); 
    return query;
}

Im wanting it to return all the information about the job, so i wrote the query above to include all those relationships. Putting a breakpoint on the linq query and looking at the results, it has exactly what I wont. All the fields, JobHeadings and Contracts are working and bringing back all the bindings to that job. So now I bring that query back in my viewmodel and populate the fields, like so..

void loadOp_Completed(object sender, EventArgs e)
{
    try
    {
        LoadOperation<Job> loadOp = sender as LoadOperation<Job>;
        if (!loadOp.HasError)
        {
            _job = loadOp.Entities.FirstOrDefault<Job>();

            base.IsLoading = false;
            base.ProgressBarVisibility = Visibility.Collapsed;
            base.OnPropertyChanged("IsLoading");
            base.OnPropertyChanged("ProgressBarVisibility");
            base.OnPropertyChanged("CurrentJob");
        }
    }
    catch (Exception ex)
    {
    }
}

My problem is, that no relationship data is coming back. All the basic Job info is coming back from the Job table in my db, but none of the info from the related tables is coming back in my viewmodel. Putting a bp in and looking at _job, which should contain everything, all the relationship tables JobHeading/JobContract say ‘Enumeration yielded no results.’

So how is it not making its way back through to the viewmodel? What can i do to get the full query results put into the view/viewmodel so I can make changes?

  • 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-11T08:25:20+00:00Added an answer on June 11, 2026 at 8:25 am

    This was a problem with the metadata service not picking up my latest table associations. After i went through that mess of regenerating the metadata, it was a simple matter of including and associating the correct keys. Thank you Quinton Bernhardt for your effort!

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

Sidebar

Related Questions

I have a Silverlight 3 app using WCF RIA Services and Entity Framework for
I have a Silverlight app that is using the MVVM pattern. I have a
I'm writing a Silverlight app using the MVVM pattern. I have a main view
I have a scribbale inkpresenter in my silverlight app that I'm using multiple times
I have a search textbox on silverlight app where user types in search term
I currently have an app (in Silverlight), using mv-vm, that has an interface to
I have a C# Silverlight app that lets the user select which spreadsheet they
I'm building a Silverlight app using Jounce for my MVVM. I have a CustomerListViewModel
I have a Silverlight app that displays a number of pages. Each page is
I am developing a Silverlight app using VS2008 Express. I have just implemented a

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.