public FacetsDatabaseSectionViewModel() { DbSection = GetFacetsDatabaseSection(); _connectionBuilderCreator = () => new FacetsDataBaseConnectionBuilder(DbSection); OnDatabaseProviderSelectionChangedCommand = new DelegateCommand(OnDatabaseProviderSelctionChangedExecute); OnResetButtonClickedCommand = new DelegateCommand(OnResetButtonCLickedCommandExecute); OnTestConnectionClickedCommand = new DelegateCommand(OnTestConnectionClickCommandExecute); _eventAggregator.GetEvent <OnDatabaseProviderSelectionChangedEvent>() .Subscribe(OnDatabaseProviderSelctionChanged); _eventAggregator.GetEvent <OnResetButtonClickedEvent>().Subscribe(OnResetButtonClickExecute); _eventAggregator.GetEvent <OnTestConnectionClickedEvent>().Subscribe(OnTestConnectionClickExecute); _connectionService = new TestConectionService("System.Data.SqlClient"); }
public TestConnectionClass(ITestConnectionService testConnectionService, string connectionString) { _testConnectionService = testConnectionService; _connectionString = connectionString; }