Ejemplo n.º 1
0
        public async Task <IUnitOfWork> CreateAsync(bool transactional = false, IsolationLevel isolationLevel = IsolationLevel.ReadCommitted, RetryOptions retryOptions = null, CancellationToken cancellationToken = default)
        {
            var conn = new SqlConnection(_connectionString);
            await conn.OpenAsync(cancellationToken);

            return(new UnitOfWork(conn, _currentUserService, _dateTime, _cache, transactional, isolationLevel, retryOptions));
        }
Ejemplo n.º 2
0
        public IUnitOfWork Create(bool transactional = false, IsolationLevel isolationLevel = IsolationLevel.ReadCommitted, RetryOptions retryOptions = null)
        {
            var conn = new SqlConnection(_connectionString);

            conn.Open();

            return(new UnitOfWork(conn, _currentUserService, _dateTime, _cache, transactional, isolationLevel, retryOptions));
        }