I have a collection of documents with a few small properties, and one huge property (a binary 10MB or so PDF document). I'm using the latest stable C# driver, published on 2015-04-02. Is there a way to get a list of these documents, with all the small properties, but excluding the huge binary one?
You would want to use IFindFluent.Find
and then use IFindFluent.Projection
and Builders.Projection.Exclude
to exclude this property:
var query = collection.
Find(filter).
Project<Document>(Builders<Document>.Projection.Exclude(doc => doc.HugeBlob));
var results = await query.ToListAsync();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With