Method WithReadPreference
WithReadPreference(ReadPreference)
Returns a new MongoDatabase instance with a different read preference setting.
public virtual MongoDatabase WithReadPreference(ReadPreference readPreference)
Parameters
readPreference
ReadPreferenceThe read preference.
Returns
- MongoDatabase
A new MongoDatabase instance with a different read preference setting.