Table of Contents

Method WithReadPreference

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

WithReadPreference(ReadPreference)

Returns a new IMongoClient instance with a different read preference setting.

public IMongoClient WithReadPreference(ReadPreference readPreference)

Parameters

readPreference ReadPreference

The read preference.

Returns

IMongoClient

A new IMongoClient instance with a different read preference setting.