/// <summary> /// Each test will start by testing for an empty table, and each test /// will leave the database state as it found it. /// </summary> private void TruncatePersonTable() { // We have to work with what we have :) peopleProvider = new PeopleProvider(); var people = peopleProvider.ListPeople(); people.ToList().ForEach(p => peopleProvider.DeletePerson(p.ID)); }
public LeftPanelViewModel(IEventAggregator eventAggregator) { _eventAggregator = eventAggregator; _eventAggregator.GetEvent <PersonChangedEvent>().Subscribe(PersonChanged); AddPersonCommand = new DelegateCommand(AddPersonExecute); DeletePersonCommand = new DelegateCommand(DeletePersonExecute, DeletePersonCanExecute); BlankLongCommand = new DelegateCommand(BlankLongExecute); BlankLongAsyncCommand = DelegateCommand.FromAsyncHandler(BlankLongAsyncExecute); PassEventParamsCommand = new DelegateCommand <EventArgs>(PassEventParamsExecute); PeopleProvider peopleProvider = new PeopleProvider(); People = new ObservableCollection <PersonListItemViewModel>(peopleProvider.GetPeople().Select(x => new PersonListItemViewModel(x))); }
public PeopleService(PeopleContext db) { _provider = new PeopleProvider(db); }