Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow connection/transaction to be passed from the outside when opening the session #116

Open
SzymonPobiega opened this issue Oct 5, 2022 · 0 comments
Labels
Improvement New feature or request

Comments

@SzymonPobiega
Copy link
Member

In some brown field scenarios the connections are managed by the existing infrastructure and changing that is not feasible. In order to use Transactional Session in these cases it is necessary to be able to pass the connection/transaction information from the outside when opening the session e.g.

using var childBuilder = builder.CreateChildBuilder();
var session = childBuilder.Build<ITransactionalSession>();
await session.Open(
        new SqlPersistenceOpenSessionOptions(("MyTenantIdHeader","TenantA"), sqlTransaction))
    .ConfigureAwait(false);
@SzymonPobiega SzymonPobiega added the Improvement New feature or request label Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant