2014년 12월 16일 화요일

Mongo BulkWriteResult.WriteErrors in C# driver ?

According to http://docs.mongodb.org/manual/reference/method/BulkWriteResult/#BulkWriteResult

there is a BulkWriteResult.writeErrors property. I can not find this in the C# driver version 1.9.2

Am I missing something?



The documentation you linked to is for the MongoDB Shell.

It works a little differently in the C# driver.

A BulkWriteResult does not have a WriteErrors property because when a bulk write succeeds and returns a BulkWriteResult there are no errors.

If something goes wrong during a bulk write, a MongoBulkWriteException will be thrown, and the exception has a property called WriteErrors that describes the write errors.



댓글 없음:

댓글 쓰기