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

InvalidException like due to ISession doc/usage confusion #585

Open
ShaneCourtrille opened this issue Aug 8, 2024 · 0 comments
Open

InvalidException like due to ISession doc/usage confusion #585

ShaneCourtrille opened this issue Aug 8, 2024 · 0 comments

Comments

@ShaneCourtrille
Copy link

I'm a bit confused about ISession due to the fact the code doc says it "Represents a connection to the Document Store" yet it has a method called CreateConnectionAsync() which returns a DbConnection.

In our (customized Orchard Core) code we get an ISession which we then call CreateConnectionAsync() on. We're starting to see what appear to be race condition where we get an InvalidOperation due to the connection being closed so I'm wondering if we're misusing the ISession by asking it for a connection. Are we actually getting the sessions connection as opposed to creating a new one? The naming says Create but is it instead a Get under the hood?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant