我有文件列表(对象)该对象有多个文件,即Json记录存在,但我尝试上传文件串(记录)它不上传文档数据库,但我上传单文档记录,它成功上传.
List<MyModelClass> listObj = new List<MyModelClass>();
Document doc = await DocumentClient.CreateDocumentAsync("dbs/" + DocumentDatabase.Id + "/colls/" + DocumentCollection.Id, listObj);
Run Code Online (Sandbox Code Playgroud)
上面的代码不工作.....
foreach (var item in listObj )
{
Document doc = await Client.CreateDocumentAsync("dbs/" + DocumentDatabase.Id + "/colls/" + DocumentCollection.Id, item);
}
Run Code Online (Sandbox Code Playgroud)
这段代码对我有用.....
Syntax : CreateDocumentAsync(String,?Object,?RequestOptions,?Boolean)
Object :- Document object // I Know it as per syntax it need to be "Document Type".
Run Code Online (Sandbox Code Playgroud)
我想要任何其他方式一次上传所有文档....