Table of Contents

Class StringIdStoredAsObjectIdConvention

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

A convention that sets the representation of a string id class member to ObjectId in BSON with a StringObjectIdGenerator. This convention is only responsible for setting the serializer and idGenerator. It is assumed that this convention runs after other conventions that identify which member is the _id and that the _id has already been added to the class map.

public class StringIdStoredAsObjectIdConvention : ConventionBase, IMemberMapConvention, IConvention
Inheritance
StringIdStoredAsObjectIdConvention
Implements
Inherited Members
Extension Methods

Methods

Apply(BsonMemberMap)

Applies a modification to the member map.