I want to be able to execute a database method using the C# SDK (2.2.4). Take db.version() for example.
I've tried to play around with Database.RunCommand, but with no luck:
var command = new BsonDocumentCommand<BsonDocument>(new BsonDocument
{
{ "version", 1 }
});
var versionResult = Database.RunCommand(command);
Exception:
MongoDB.Driver.MongoCommandException: Command version failed: no such command: 'version', bad cmd: '{ version: 1 }'.