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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.