C# MongoDB.Driver 2.2. - Usage of GridFs

11,406

The .NET driver documentation has a detailed guide on using GridFS. http://mongodb.github.io/mongo-csharp-driver/2.2/reference/gridfs/

Share:
11,406
black_tears
Author by

black_tears

C# Developer MCPD

Updated on June 07, 2022

Comments

  • black_tears
    black_tears almost 2 years

    I 've used the GridFs functions with the legacy mongo db c# driver in the following way.

    var file = Database.GridFS.FindOne(Query.EQ("_id", ObjectId.Parse(file.Id)));
    

    The MongoDb C# 2.1 driver, implements GridFs in an other way, could somebody show me please an example? I've found no documentation yet.