> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>
If you just want to remove all data from a collection, you should call
.drop() not .remove( {} )
Thanks for all the help !
On Nov 17, 2:55 pm, Robert Stam <rob...@10gen.com> wrote:
> The implementation of DropCollection has always been to send a drop command
> to the server, so it shouldn't make any difference what version of the
> driver you were using. Your code is basically equivalent to the driver's
> implementation of DropCollection.
>
> On Thu, Nov 17, 2011 at 5:04 AM, Mark de Jong <av3n...@gmail.com> wrote:
>
>
>
>
>
>
>
> > The daemon is quite stable now. I am using this now:
>
> > public void Clear()
> > {
> > if (collection.Exists())
> > {
> > var command = new CommandDocument {
> > { "drop", collectionName },
> > };
>
> > collection.Database.RunCommand(command);
> > }
> > }
>
> > collection.Drop does not seem to issue the "drop" command.. I am using
> > 1.3 mongocsharpdriver from nuget.
>
> > Reading the source from github:
>
> >https://github.com/mongodb/mongo-csharp-driver/blob/master/Driver/Cor...