void OnCustomerAddedToRepository(object sender, CustomerAddedEventArgs e) { var viewModel = new CustomerViewModel(e.NewCustomer, _customerRepository); this.AllCustomers.Add(viewModel); }
void CreateNewCustomer() { FECustomer newCustomer = new FECustomer(); CustomerViewModel workspace = new CustomerViewModel(newCustomer, _customerRepository); this.Workspaces.Add(workspace); this.SetActiveWorkspace(workspace); }