MongoDB
 SQL >> Datenbank >  >> NoSQL >> MongoDB

Mit IAsyncCursor im MongoDB C#-Treiber iterieren

Drei Wege sind üblich:

  • ForEachAsync oder ToListAsync
  • await foreach mit IAsyncEnumerable
  • manuell mit MoveNextAsync und Current
await cursor.ForEachAsync(x => Console.WriteLine(x));