public ConnectionFactory(DataBase db , Des3EncryptionService encryption ) { try { if (db.Factory != null) { this.m_factory = db.Factory; } else { this.m_factory = GetFactory(db.Type); } if (string.IsNullOrEmpty(db.ConnectionString)) { this.m_cs = GetCS(db, this.m_factory); } else { this.m_cs = db.ConnectionString; } this.m_encryption = encryption; this.m_db = db; } catch (System.Exception ex) { System.Console.WriteLine(ex.Message); throw; } } // End Constructor
} // End Constructor public ConnectionFactory(Microsoft.Extensions.Configuration.IConfiguration config , Des3EncryptionService encryption ) : this(config.GetSection("DB").Get <DataBase>(), encryption) { } // End Constructor