public Task<OutboxTransaction> BeginTransaction(ContextBag context)
        {
            var session = documentStore.OpenAsyncSession();

            session.Advanced.UseOptimisticConcurrency = true;

            context.Set(session);
            var transaction = new RavenDBOutboxTransaction(session);
            return Task.FromResult<OutboxTransaction>(transaction);
        }
Ejemplo n.º 2
0
        public Task <OutboxTransaction> BeginTransaction(ContextBag context)
        {
            var session = GetSession(context);

            session.Advanced.UseOptimisticConcurrency = true;

            context.Set(session);
            var transaction = new RavenDBOutboxTransaction(session);

            return(Task.FromResult <OutboxTransaction>(transaction));
        }