Table of Contents

Method WithReadPreference

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

WithReadPreference(ReadPreference)

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

public virtual MongoServer WithReadPreference(ReadPreference readPreference)

Parameters

readPreference ReadPreference

The read preference.

Returns

MongoServer

A new MongoServer instance with a different read preference setting.