private void ExecuteAddCommand(object o) { var addController = new WindowAddController(); var customer = addController.AddCustomer(); if (customer != null) { _customerRepository.Save(customer); _viewModel.Models.Add(customer); } }
public void ExecuteAddCommand(object obj) { WindowAddController winAddCtr = new WindowAddController(); Customer customer = winAddCtr.AddCustomer(); if (customer != null) { mViewModel.Models.Add(customer); mCustomerRepository.Save(customer); } }