withSIX.Mini.Infra.Data.Services.DbContextScope.DbContextScope C# (CSharp) Method

DbContextScope() public method

public DbContextScope ( ILocalCache cache, Func apiContextCreator, ISettingsStorage settingsStorage ) : System
cache ILocalCache
apiContextCreator Func
settingsStorage ISettingsStorage
return System
        public DbContextScope(ILocalCache cache, Func<ApiContext> apiContextCreator, ISettingsStorage settingsStorage) {
            _parentScope = GetAmbientScope();
            if (_parentScope == null)
                _contexts = new DbContexts(cache, apiContextCreator, settingsStorage);
            else {
                _contexts = _parentScope._contexts;
                _nested = true;
            }
            SetAmbientScope(this);
        }