문제

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