1
我需要獲取更新查詢狀態意味着,查詢是否成功執行。我如何做到這一點。如何獲得Mongo更新查詢狀態在c#
MongoCollection<BsonDocument> Updatecollection =
MongoDBs.GetCollection<BsonDocument>(collectionName);
Updatecollection.Update(query, update, UpdateFlags.Multi);
這是我用來更新我的集合的方式,請幫助我獲取查詢狀態。
由於事先 希瓦
嗨@JohnnyHK感謝您的答覆,我用UpdatedExisting與我的查詢,並得到了布爾值,也試圖與documentsAffected,它給受影響的文件的數量。請你告訴我如何得到查詢異常。 – siva 2013-02-20 15:18:20