public SQLServerStorage(IOptions <SQLServerStorageOptions> options, SQLServerConnectionFactory connectionFactory, ILogger <SQLServerStorage> logger) { _options = options.Value; ConnectionFactory = connectionFactory; Logger = logger; if (_options.EnableDefer) { _deferFlushCollection = new AsyncCallbackDeferFlushCollection <IRequestInfo, IRequestDetail>(AddRequestInfoAsync, _options.DeferThreshold, _options.DeferSecond); } }
public SQLServerStorage(IOptions <SQLServerStorageOptions> options, SQLServerConnectionFactory connectionFactory, ILogger <SQLServerStorage> logger) { _options = options.Value; if (!_options.TablePrefix.IsEmpty()) { Prefix = _options.TablePrefix + "."; } ConnectionFactory = connectionFactory; Logger = logger; if (_options.EnableDefer) { _deferFlushCollection = new AsyncCallbackDeferFlushCollection <RequestBag>(AddRequestInfoAsync, _options.DeferThreshold, _options.DeferSecond); } }
public SQLServerStorage(IOptions <SQLServerStorageOptions> options, ILogger <SQLServerStorage> logger) : base(new BaseStorageOptions { DeferSecond = options.Value.DeferSecond, DeferThreshold = options.Value.DeferThreshold, ConnectionString = options.Value.ConnectionString, DataType = FreeSql.DataType.SqlServer }) { _options = options.Value; Logger = logger; }
public SQLServerStorage(IOptions <SQLServerStorageOptions> options, SQLServerConnectionFactory connectionFactory, ILogger <SQLServerStorage> logger) : base(new BaseStorageOptions { DeferSecond = options.Value.DeferSecond, DeferThreshold = options.Value.DeferThreshold, ConnectionString = options.Value.ConnectionString, DataType = FreeSql.DataType.SqlServer }) { _options = options.Value; if (!_options.TablePrefix.IsEmpty()) { Prefix = _options.TablePrefix + "."; } ConnectionFactory = connectionFactory; Logger = logger; }