public DBConnector(string strConnectionString, DbConnectorSettings dbConnectorSettings, IMemoryCache cache, IHttpContextAccessor httpContextAccessor)
 {
     ThrowNotificationExceptions = true;
     ForceLocalCache             = false;
     UpdateManyToMany            = true;
     UpdateManyToOne             = true;
     CacheData = true;
     CustomConnectionString = strConnectionString;
     DbConnectorSettings    = dbConnectorSettings;
     CacheManager           = new DbCacheManager(this, cache);
     FileSystem             = new RealFileSystem();
     DynamicImageCreator    = new DynamicImageCreator(FileSystem);
     HttpContext            = httpContextAccessor?.HttpContext;
     WithTransaction        = true;
 }
        public DBConnector(string strConnectionString, DbConnectorSettings dbConnectorSettings, IMemoryCache cache)
        {
            if (!string.IsNullOrWhiteSpace(dbConnectorSettings.ConnectionString))
            {
                ConnectionString = dbConnectorSettings.ConnectionString;
            }

            ThrowNotificationExceptions = true;
            ForceLocalCache             = false;
            UpdateManyToMany            = true;
            UpdateManyToOne             = true;
            CacheData = true;
            CustomConnectionString = strConnectionString;
            DbConnectorSettings    = dbConnectorSettings;
            CacheManager           = new DbCacheManager(this, cache);
            FileSystem             = new RealFileSystem();
            DynamicImageCreator    = new DynamicImageCreator(FileSystem);
            WithTransaction        = true;
        }
        public DBConnector(string strConnectionString, DatabaseType dbType = DatabaseType.SqlServer)
        {
            ForceLocalCache             = false;
            CacheData                   = true;
            UpdateManyToMany            = true;
            UpdateManyToOne             = true;
            ThrowNotificationExceptions = true;

            CustomConnectionString = strConnectionString;
            DbConnectorSettings    = new DbConnectorSettings(ConfigurationManager.AppSettings)
            {
                ConnectionString = strConnectionString,
                DbType           = dbType
            };

            CacheManager        = new DbCacheManager(this);
            FileSystem          = new RealFileSystem();
            DynamicImageCreator = new DynamicImageCreator(FileSystem);
            WithTransaction     = true;
        }