You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will throw an exception on DB.CreateCollectionAsync():
System.TypeInitializationException: The type initializer for 'MongoDB.Entities.Cache`1' threw an exception.---> System.InvalidOperationException: Database connection is not initializedfor[Default]
at IMongoDatabase MongoDB.Entities.DB.Database(stringname)
at IMongoDatabase MongoDB.Entities.TypeMap.GetDatabase(TypeentityType)
at void MongoDB.Entities.Cache<T>.Initialize()
at staticMongoDB.Entities.Cache<T>()---End of inner exception stack trace ---atIMongoDatabase MongoDB.Entities.Cache<T>.get_Database()
at IMongoDatabase MongoDB.Entities.DB.Database<T>()
I tried putting DB.DatabaseFor<Book>("somedb"); before the call to DB.CreateCollectionAsync()... same exception
The text was updated successfully, but these errors were encountered:
I am also encountering this now on v23.1.1 using MongoDB v7.0.14
I was trying to create a capped collection (as per documentation)
This will throw an exception on DB.CreateCollectionAsync():
I tried putting
DB.DatabaseFor<Book>("somedb");
before the call toDB.CreateCollectionAsync()
... same exceptionThe text was updated successfully, but these errors were encountered: