Closed keymatic closed 5 years ago
Hello @keymatic
Yes the idea is that the Entity property is the object to be saved, not the one that you saved. The idea behind it is that if cosmos fails, you still have your object in the failed response to add some custom retry logic.
Originally I was thinking that I could check the status code and then replace it with the returned resource but I rejected this idea because this would involve json deserialisation which would slow down the response.
I will add something in the docs and the property summary to make that clear.
This is now fixed on the latest version. Closing.
Hello.
Thank you for all your hard work.
I'm trying to use JsonSerializerSettings to format dates in objects saved to CosmosDB. Here is an example console application code:
here is the output:
The goal here is to store only 3 decimals in date field. I would expected addedResponse.Entity object to have only 3 decimals in date field but according to output it has 7 decimals. If you get the saved object from CosmosResponse.ResourceResponse it contains 3 decimals as expected.
Is it an expected behavior that CosmosResponse.Entity is the object "to be saved" but not "actually saved"?