I'm trying to save a XML file in DocumentDb in Json format. I have no problem in converting it and saving. All the conversion and saving are working fine.
However when I store my Xml file the DocumentDB provides its own file name to the file. Eg; 8756b9b9-41ac-47ca-9f4c-abec60b318be.
But I want to save the file with my own custom name Eg; MyXmlFile1 or MyXmlFile2 etc;
How do I pass my custom name when saving the file? That is MyXmlFile1 or MyXmlFile2.
"jsontoStore" has the content of the file I want to store into DocumentDB. Code1: Storing without passing any file name.
await client.CreateDocumentAsync(documentCollection.SelfLink, jsontoStore);
Code2: Storing with custom file name but here I'm not able to pass my content that is "jsontostore"
document = await client.CreateDocumentAsync(documentCollection.SelfLink,
new Document
{
Id = "sample1"
});