Generic count property in _WriteResult class
Hi,
I'm using a MongoDB as a backend for my API and often come to a case where i want to validate whether I updated, inserted or deleted any records. At the moment I use the deletedcount and machtedcount properties in the DeleteResult and UpdateResult object. To provide a more generic way I thought it may makes sense to provide a new property in the generic WriteResult class called affectedrecords or something like that so you can generic react to the result of your database transaction and maybe return a 404 if nothing was updated, deleted or created.
Let me know what you think and thanks in advance.
1
vote
Nik
shared this idea