質問

Could anyone say how to replace obsolete SafeMode with WriteConcern ? In particular I am interesting in SafeMode.True ?

Thanks.

役に立ちましたか?

解決

SafeMode.True translates to WriteConcern.Acknowledged.

From the driver source code, SafeMode.cs:

private static SafeMode __true = new SafeMode(WriteConcern.Acknowledged);

他のヒント

Use the new MongoClient type to connect instead of MongoServer.Create. Write concern will default to acknowledged with MongoClient, which is the equivalent of the obsolete safe mode setting being true.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top