I have a collection in a database, I want to export it to a json file in c#.
I know the command that can be executed through the mongo shell.
Has this command - mongoexport --collection = movies --db = director --out = movies.json
But I'm looking for the c # code to do that. Would appreciate help.