Toggle navigation
Hot Examples
ZH
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
C#
PHP
C#
Java
Go
C++
Python
JS
TS
搜索
Home
MongoDB
Bson
Serialization
IdGenerators
ObjectIdGenerator
GenerateId
MongoDB.Bson.Serialization.IdGenerators.ObjectIdGenerator.GenerateId C# (CSharp) Method
ObjectIdGenerator Class Documentation
显示文件
Open project: CloudMetal/mongo-csharp-driver
GenerateId()
public
method
Generates an Id for a document.
public
GenerateId
(
object
container
,
object
document
) :
object
container
object
The container of the document (will be a MongoCollection when called from the C# driver).
document
object
The document.
return
object
public object GenerateId(object container, object document) { return ObjectId.GenerateNewId(); }
ObjectIdGenerator
GenerateId
IsEmpty
ObjectIdGenerator