August 2012
Intermediate to advanced
490 pages
9h 14m
English
The next thing we need to do is to get a list of customers to display in the UI. Our approach will be to create a data provider that will query the entity framework to get our entities, which we will use as our models. To accomplish this, follow these steps:
Northwind.ViewModel to Northwind.Data. System.Data.Entity. using statements for System.Collections.Generic, Northwind.Data, and System.Data.Objects to MainWindowViewModel. MainWindowViewModel:private IList<Customer> _customers; public IList<Customer> Customers { get { if (_customers == null) { GetCustomers(); } return _customers; } } private void GetCustomers() { _customers = new NorthwindEntities() ...Read now
Unlock full access