Table of Contents

Method WithReadPreference

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

WithReadPreference(ReadPreference)

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

public abstract IMongoCollection<TDocument> WithReadPreference(ReadPreference readPreference)

Parameters

readPreference ReadPreference

The read preference.

Returns

IMongoCollection<TDocument>

A new IMongoCollection instance with a different read preference setting.