Viewing customer details

Next, we will be updating Northwind to allow us to view customer details.

Viewing details for one customer

We will view the details for one customer by opening a tab for each customer detail in the UI using the technique that we just covered. We will start things off by creating the ToolViewModel derived view model and its associated view (UserControl). We will then connect the pieces using a data template to map our view to our view model. To do this, perform the following steps:

  1. Update the IUIDataProvider interface to add the following method:
    Customer GetCustomer(string customerID);
    
  2. Update UIDataProvider as follows:
    public class UIDataProvider : IUIDataProvider { private NorthwindEntities _northwindEntities = new NorthwindEntities(); ...

Get MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.