public void SaveConnectionSettings(ICreateDatabase provider, InstallModel installModel)
        {
            var databaseSettings = _systemConfigurationProvider.GetSystemSettings<DatabaseSettings>();

            databaseSettings.ConnectionString = provider.GetConnectionString(installModel);
            databaseSettings.DatabaseProviderType = installModel.DatabaseProvider;

            _systemConfigurationProvider.SaveSettings(databaseSettings);
        }
Beispiel #2
0
        public void SaveConnectionSettings(ICreateDatabase provider, InstallModel installModel)
        {
            DatabaseSettings databaseSettings = _systemConfigurationProvider.GetSystemSettings <DatabaseSettings>();

            databaseSettings.ConnectionString     = provider.GetConnectionString(installModel);
            databaseSettings.DatabaseProviderType = installModel.DatabaseProvider;

            _systemConfigurationProvider.SaveSettings(databaseSettings);
        }
Beispiel #3
0
 public static bool ValidateConnectionString(this ICreateDatabase createDatabase, InstallModel installModel)
 {
     try
     {
         createDatabase.GetConnectionString(installModel);
         return(true);
     }
     catch (Exception exception)
     {
         return(false);
     }
 }