Table of Contents

Method AsQueryable

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

AsQueryable<T>(MongoCollection)

Returns an instance of IQueryable{{T}} for a MongoCollection.

public static IQueryable<T> AsQueryable<T>(this MongoCollection collection)

Parameters

collection MongoCollection

The name of the collection.

Returns

IQueryable<T>

An instance of IQueryable{{T}} for a MongoCollection.

Type Parameters

T

The type of the returned documents.

AsQueryable<T>(MongoCollection<T>)

Returns an instance of IQueryable{{T}} for a MongoCollection.

public static IQueryable<T> AsQueryable<T>(this MongoCollection<T> collection)

Parameters

collection MongoCollection<T>

The name of the collection.

Returns

IQueryable<T>

An instance of IQueryable{{T}} for a MongoCollection.

Type Parameters

T

The type of the returned documents.