Beispiel #1
0
        protected virtual async Task <TDbContext> GetDbContextAsync(CancellationToken cancellationToken = default)
        {
            if (_currentDbContext == null)
            {
                _currentDbContext = await DbContextProvider.GetDbContextAsync(cancellationToken);
            }

            return(_currentDbContext);
        }
 public async Task <IDbConnection> GetDbConnectionAsync() => (await _dbContextProvider.GetDbContextAsync()).Database.GetDbConnection();