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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -