public NavigationViewModel(IClientLookupDataService clientLookupDataService, IEventAggregator eventAggregator) { _clientLookupDataService = clientLookupDataService; _eventAggregator = eventAggregator; Clients = new ObservableCollection <NavigationItemViewModel>(); _eventAggregator.GetEvent <AfterClientSavedEvent>().Subscribe(AfterClientSaved); }
public NavigationViewModel(IClientLookupDataService clientLookupService, IWorkoutLookupDataService workoutLookupService, IExerciseLookupDataService exerciseLookupDataService, IEventAggregator eventAggregator) { _clientLookupService = clientLookupService; _workoutLookupService = workoutLookupService; _exerciseLookupDataService = exerciseLookupDataService; _eventAggregator = eventAggregator; Clients = new ObservableCollection <NavigationItemViewModel>(); Workouts = new ObservableCollection <NavigationItemViewModel>(); Exercises = new ObservableCollection <NavigationItemViewModel>(); _eventAggregator.GetEvent <AfterDetailSavedEvent>().Subscribe(AfterDetailSaved); _eventAggregator.GetEvent <AfterDetailDeletedEvent>().Subscribe(AfterDetailDeleted); }