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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:18:33+00:00 2026-05-12T15:18:33+00:00

The Scenario Currently I have a c# silverlight business application. The application is hosted

  • 0

The Scenario

Currently I have a c# silverlight business application. The application is hosted in Asp.net using the ADO.Net entity framework and a domain service class to read/write to/from my sql server database.

The Setup

Client UI

In my silverlight client interface I have an autocomplete box which uses a query to get a list of items relating to the search. The query is in my domain service class and looks as follows:

public IQueryable<Status> GetStatus()
        {
            var q = (from job in Context.Job
                     select job.Status).Distinct()
                    .Select(deliveryState => new Status
                    {
                        DeliveryState = deliveryState,
                        Count = Context.Job.Count
                            (job => job.Status.Trim() == deliveryState.Trim())
                    });
            q = q.Where(job => job.DeliveryState != null);
            return q;
        }

Code Behind

Then in my code behind for the silverlight client interface xaml page, I load the query in the contructor using the following code:

var context = dds.DomainContext as InmZenDomainContext;
            statusFilterBox.ItemsSource = context.Status;
            context.Load(context.GetStatusQuery(), (lo) =>
            {
                //just to show you how to load..  
                //new  ErrorWindow("Loaded.." + lo.Entities.Count()).Show(); 
            }, null);

The Issue

The issue I have is what happens now if I add another autocomplete box to my client interface, and another Get query to perform a different type of search:

public IQueryable<ShortCode> GetShortCode()
        {
            var q = (from job in Context.Job
                     select job.ShortCode).Distinct()
                    .Select(name => new ShortCode
                    {
                        Name = name,
                        Count = Context.Job.Count
                            (job => job.ShortCode.Trim() == name.Trim())
                    });
            q = q.Where(job => job.Name != null);
            return q;
        }

The issue arises due to the fact that the “Context.Load()” function does not support loading multiple queries. Also If I try to declare to separate “Context.Load()” – Only one of them works……..

How can I get around this!?!

  • 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-12T15:18:33+00:00Added an answer on May 12, 2026 at 3:18 pm

    This is kind of an indirect answer to you question so take it or leave it.

    I have multiple AutoCompleteBoxes on one screen but I am not using a DDS. I gave up the DDS a long time ago when I kept running into problems. The main thing that I dont like about the dds is that so much of the logic is in the view.

    What I do is bind my ACB directly to the entity and use a custom filter to do my complex searches. The list that it searches is an entity list that I populate using the get command

    public EntityList<Person> Person
            {
                get { return _DomainContext.Persons; }
            }
    

    I could go into more detail but if you are lock into using the DDS then I will leave it at that.

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

Sidebar

Ask A Question

Stats

  • Questions 243k
  • Answers 243k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer That puts the regex itself in scalar context, which isn't… May 13, 2026 at 7:45 am
  • Editorial Team
    Editorial Team added an answer Found the problem was related to the fact that the… May 13, 2026 at 7:45 am
  • Editorial Team
    Editorial Team added an answer If you define fixtures as 'users', then the way to… May 13, 2026 at 7:45 am

Related Questions

Background Currently I have a C# Silverlight business application which uses RIA Services. The
The Scenario Currently I have a C# Silverlight Application That uses the domainservice class
I am currently in my final year at school, studying for a Higher National
I believe there is a way to do this, but I'm not familiar with

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.