在带有MongoDB.Driver 2.7.2的异步控制台Core .net 2.1中,随机未插入文档,但没有抛出异常
public async Task InsertRequestLog(RequestLog messageLog)
{
_client = new MongoClient(Settings.MongoDb);
_database = _client.GetDatabase(_databaseName);
var collection = _database.GetCollection<RequestLog>("RequestLog");
await collection.InsertOneAsync(messageLog);
}