Method As
As<TSource, TResult>(IQueryable<TSource>, IBsonSerializer<TResult>)
Allows the results to be interpreted as a different type. It is up to the caller to determine that the new result type is compatible with the actual results.
public static IQueryable<TResult> As<TSource, TResult>(this IQueryable<TSource> source, IBsonSerializer<TResult> resultSerializer = null)
Parameters
sourceIQueryable<TSource>A sequence of values.
resultSerializerIBsonSerializer<TResult>The new serializer (optional, will be looked up if null).
Returns
- IQueryable<TResult>
A new IQueryable with a new result type.
Type Parameters
TSourceThe type of the elements of
source.TResultThe new result type for the results.