Hi,
For some edge cases where we need to speed up the deserialization would this be the “best” approach?
Tks!
List<RawBsonDocument> rawValues =
await (await rawCollection.FindAsync(new BsonDocumentFilterDefinition<RawBsonDocument>(new BsonDocument())))
.ToListAsync();
List<Facility> facilitiesBag = rawValues.AsParallel().WithDegreeOfParallelism(2)
.Select(r => BsonSerializer.Deserialize<Facility>(r.ToBson())).ToList();