Interface IIdGenerator
- Namespace
- MongoDB.Bson.Serialization
- Assembly
- MongoDB.Bson.dll
An interface implemented by Id generators.
public interface IIdGenerator
- Extension Methods
Methods
GenerateId(object, object)
Generates an Id for a document.
object GenerateId(object container, object document)
Parameters
container
objectThe container of the document (will be a MongoCollection when called from the C# driver).
document
objectThe document.
Returns
- object
An Id.
IsEmpty(object)
Tests whether an Id is empty.
bool IsEmpty(object id)
Parameters
id
objectThe Id.
Returns
- bool
True if the Id is empty.