Exemple #1
0
        public SQLiteProvider(IOptions <HttpTrackerSQLiteOptions> options)
        {
            Options = options.Value;

            if (string.IsNullOrEmpty(Options.ConnectionString))
            {
                throw new Exception("SQLite 配置有误,请检查。");
            }
        }
Exemple #2
0
        public HttpTrackerLogRepository(IDbConnectionProvider dbConnectionProvider, HttpTrackerSQLiteOptions options, string name) : base(dbConnectionProvider)
        {
            var tableName = $"{DbConsts.TableNames.HttpTrackerLog}_{name}";

            if (!string.IsNullOrEmpty(options.TablePrefix))
            {
                tableName = $"{options.TablePrefix}_{tableName}";
            }

            TableName = tableName;
        }