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

  • Home
  • SEARCH
  • 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 6824429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:54:02+00:00 2026-05-26T21:54:02+00:00

I am working on a Prism desktop application and would like to know the

  • 0

I am working on a Prism desktop application and would like to know the best way to deal with lookup / reference data lists when using a WCF backend. I think this question may cover a few areas and I would appreciate some guidance

For example, consider a lookup that contains Products(codes and descriptions) which would be used in a lot of different input screens in the system.

  1. Does the viewmodel call the WCF service directly to obtain the data to fill the control?
  2. Would you create a control that solely deals with Products with its own viewmodel etc and then use that in every place that needs a product lookup or would you re-implements say a combobox that repopulates the products ItemsSource in every single form view model that uses it?
  3. Would I create a brand new WCF service called something like LookupData service and use that to populate my lookup lists? – I am concerned I will end up with lots of lookups if I do this.
  4. What other approaches are there for going about 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-26T21:54:03+00:00Added an answer on May 26, 2026 at 9:54 pm

    I suggest creating your lookup object/component as a proxy object for WCF service. It can work in several ways, but most simple coming to my mind would be:

    1. Implement WCF service with methods to provide all Products entities and requested one (eg. basing on product code)
    2. Implement component that will use WCF client to get products, let’s call it ProductsProvider
    3. Your view models will take dependency on ProductsProvider (eg. via constructor injection)

    Key element in this model is ProductsProvider – it will work as kind of cache for Products objects. First, it will ask web service for all products (or some part of it, up to your liking) to start with. Then, whenever you need to lookup product, you ask provider – it’s provider’s responsibility to deal with how product should be looked up – maybe it’s already in local list? Maybe it will need to call web service for update? Example:

    public class ProductsProvider
    {
        private IList<Product> products;
        private IProductsService serviceClient;
    
        public ProductsProvider(IProductsService serviceClient)
        {
            this.serviceClient = serviceClient;
            this.products = serviceClient.GetAllProducts();
        }
    
        public Product LookUpProduct(string code)
        {
            // 1: check if our local list contains product with given code
            // 2: if it does not, call this.serviceClient.LookUpProduct
            // 3: if service also doesn't know such product:
            //    throw, return null, report error
        }
    }
    

    Now, what this gives you is:

    • you only need to have one ProductsProvider instance
    • better flexibility with when and how your service is called
    • your view models won’t have to deal with WCF at all

    Edit:

    As for your second question. Control may not be needed, but having view model for Product entity is definitely a good idea.

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

Sidebar

Related Questions

I am currently working on a project of mine using Prism (the Composite Application
I'm tring to grok Prism (Composite Application Guidelines). What is the best way to
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
I created an application using PRISM and it's navigation features. There is main region
We have the beginnings of a modular wpf application built using prism. We want
I am working on a WPF/Prism 4/AvalonDoc application. One of my views is very
I'm working on a WPF application and is using the Model-View-ViewModel pattern. The application
I am working on a large billing application for one the Telecom companies using
I have a reference application that was working and now is broke and I
I'm creating an application silverlight 5 using prism 4 and when I'm running the

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.