title: How can I export collection to Json file?
body: <p>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 - <code>mongoexport --collection = movies --db = director --out = movies.json</code></p>
  <p>But I'm looking for the c # code to do that.
  Would appreciate help.</p>