C# with mongoDB?

I am trying to retrieve the data from the mongoDB

public static async void retrive()
        {
            var client = new MongoDB.Driver.MongoClient();
            var db = client.GetDatabase("test");
            var collection = db.GetCollection<BsonDocument>("TestDB");
            object obj = await collection.Find(Builders<BsonDocument>.Filter.Eq("id", input.Text)).ToListAsync();
}

foreach (var docs in list)
            {
                Console.WriteLine(docs);
            }

when i put a debugger at the object obj it is firing and the browser loading and showing that time out.
Can anybody tell me that where i am missing?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.