I'm coming up against this error trying to query against an IAsyncDocumentSession. There are times when I want to load a single document by it's key async, when I want to commit a number of changes async, and that's when I want to use IAsyncDocumentSession.
However, if I want to use the same session to query and then store async, I can't, but rather, I have to use two separate sessions.
Is that the recommended course of action? I can't see why I couldn't do something like:
IQueryable<MyClass> query = asyncDocumentSession.Query<MyClass>().Where(...);
foreach (MyClass mc in query)
{
// Do some changes.
// Store.
asyncDocumentSession.Store(mc);
}
// Commit async.
await asyncDocumentSession.SaveChangesAsync();
What am I missing here?