Method WithReadPreference
WithReadPreference(ReadPreference)
Returns a new IMongoCollection instance with a different read preference setting.
public abstract IMongoCollection<TDocument> WithReadPreference(ReadPreference readPreference)
Parameters
readPreference
ReadPreferenceThe read preference.
Returns
- IMongoCollection<TDocument>
A new IMongoCollection instance with a different read preference setting.