Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# MongoDB.Driver 2.2. - Usage of GridFs

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.

like image 700
black_tears Avatar asked Jan 13 '16 16:01

black_tears


Video Answer


1 Answers

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

like image 131
Craig Wilson Avatar answered Oct 16 '22 22:10

Craig Wilson