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