Closed pachanga closed 8 months ago
you can do an upsert as shown here: https://github.com/dj-nitehawk/MongoDB.Entities/issues/216#issuecomment-1868503265
but i don't think the mongo driver can do different things depending on whether its an update or insert.
i.e. if you upsert, the document/entity will have both author
set to bob
& links
set to 1
in both cases.
Hi!
I was wondering whether it's possible to update and get an entity or insert and retrieve it using one API call, so that it happens atomically on Mongo level?
Something as follows: