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:
Update the
IUIDataProvider
interface to add the following method:Customer GetCustomer(string customerID);
Update
UIDataProvider
as follows:public class UIDataProvider : IUIDataProvider { private NorthwindEntities _northwindEntities = new NorthwindEntities(); public IList<Customer> GetCustomers() { return _northwindEntities.Customers.ToList(); } public Customer GetCustomer(string customerID) { return _northwindEntities.Customers...