Beispiel #1
0
        public static IDbConnection GetIDbConnection
        (
            DatabaseType databaseType,
            string connectionString
        )
        {
            IAVSCDatabase db
                = AVSCDatabaseFactory.GetIAVSCDatabase(
                      databaseType, connectionString);

            return(db.GetDbConnection());
        }
Beispiel #2
0
        public static IDbConnection GetIDbConnection
        (
            DatabaseType databaseType,
            string serverName,
            string username,
            string password,
            string databaseName
        )
        {
            IAVSCDatabase db
                = AVSCDatabaseFactory.GetIAVSCDatabase(
                      databaseType, serverName, username, password, databaseName);

            return(db.GetDbConnection());
        }
Beispiel #3
0
        public static IAVSCDatabase GetIAVSCDatabase
        (
            IConfiguration configuration
        )
        {
            var databaseSettings = new DatabaseSettings();

            configuration.Bind(databaseSettings);

            return(AVSCDatabaseFactory.GetIAVSCDatabase
                   (
                       databaseSettings.DatabaseType,
                       databaseSettings.ServerName,
                       databaseSettings.Username,
                       databaseSettings.Password,
                       databaseSettings.DatabaseName
                   ));
        }