public IAsyncDocumentSession OpenAsyncSession()
{
if (DatabaseCommands == null)
throw new InvalidOperationException("You cannot open a session before initialising the document store. Did you forgot calling Initialise?");
if (AsyncDatabaseCommands == null)
throw new InvalidOperationException("You cannot open an async session because it is not supported on embedded mode");
var session = new AsyncDocumentSession(this, storeListeners, deleteListeners);
session.Stored += OnSessionStored;
return session;
}
#endif