MongoDb CurrentDate with setonInsert -


with $currentdate can set timestamp field server datetime.

this looks this:

updatedefinition<mydto> update = updates    .currentdate(x => x.servertimestamp);    .setoninsert(x => x.timestamp, commit.timestamp) 

but in want use setoninsert method. date set created documents not updated

is there way c# driver?


Comments

Popular posts from this blog

python - Best design pattern for collection of objects -

go - serving up pdfs using golang -

python - django admin: changing the way a field (w/ relationship to another model) is submitted on a form so that it can be submitted multiple times -