Table of Contents

Method MapIdField

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

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

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

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

Parameters

fieldLambda Expression<Func<TClass, TMember>>

A lambda expression specifying the Id field.

Returns

BsonMemberMap

The member map.

Type Parameters

TMember

The member type.