ToCursorAsync() and ToListAsync()'s namespaces in C#

Hi,
     To access the ToCursorAsync() and ToListAsync() and many other mongodb conversions  in your c# code we should add the MongoDB.Driver.Core. Click here to view how to add the MongoDB reference to your solution.

Works only with .Net 4.5 and higher versions.



using MongoDB.Driver.Core;


Call the MongoDB.Driver.Core driver in your class file by adding the above line in your namespace section and use the appropriate conversions.

Example:

   var list = await collection.Find(filter).ToListAsync();