Table of Contents

Method MapField

Namespace
MongoDB.Bson.Serialization
Assembly
MongoDB.Bson.dll

MapField<TMember>(Expression<Func<TClass, TMember>>)

Creates a member map for a field and adds it to the class map.

public BsonMemberMap MapField<TMember>(Expression<Func<TClass, TMember>> fieldLambda)

Parameters

fieldLambda Expression<Func<TClass, TMember>>

A lambda expression specifying the field.

Returns

BsonMemberMap

The member map.

Type Parameters

TMember

The member type.