Table of Contents

Method SetReadPreference

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Legacy.dll

SetReadPreference(ReadPreference)

Sets the read preference.

public virtual MongoCursor<TDocument> SetReadPreference(ReadPreference readPreference)

Parameters

readPreference ReadPreference

The read preference.

Returns

MongoCursor<TDocument>

The cursor (so you can chain method calls to it).