Skip to content

InvalidException like due to ISession doc/usage confusion  #585

@ShaneCourtrille

Description

@ShaneCourtrille

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions