Re: .NET driver and raw bson data

From: Andreas Vilinski <andreas.vilinski@xxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Wed, 4 May 2016 03:43:04 -0700 (PDT)
Why ads?
Oh, thanks!

my try was:

var collection = db.GetCollection<BsonDocument>("collection_name");

collection of BsonDocument, but tried to insert RawBsonDocument, which 
compiled but didn't work

Am Dienstag, 3. Mai 2016 22:48:38 UTC+2 schrieb Craig Wilson:

It should be as simple as using 

var collection = db.GetCollection<RawBsonDocument>("collection_name");
var doc = new RawBsonDocument(bytes);

collection.InsertOne(doc);

Perhaps you could let us know what you tried and the error you received.
Craig

On Tuesday, May 3, 2016 at 3:36:43 PM UTC-5, Andreas Vilinski wrote:

Hi,

i would like insert data structures already serialized to bson byte array 
(with FsPickler)
Can't figure out myself whether it is possible with current .NET driver.
There is RawBsonDocument class, however i was not able to make insert 
with it.

Can you help?




-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/8c73dbc6-9049-4d95-99f3-744bfef6f842%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?