Reputation: 725
From the console this is as easy as running the command:
db.<collectionName>.remove();
This does not appear to be implemented as part of the .NET driver functionality. How can I produce similar functionality within a .NET\C# program? I have a staging collection that I want to remove all records from after processing
Upvotes: 0
Views: 42
Reputation: 311935
Use RemoveAll
to remove all records from a collection:
db.GetCollection("test").RemoveAll();
Upvotes: 1