简体   繁体   English

从C#在DocumentDB中运行动态脚本

[英]Running dynamic script in DocumentDB from C#

I need to be able to run a DocumentDB JavaScript script, specified in a string, from my C# code. 我需要能够从我的C#代码中运行在字符串中指定的DocumentDB JavaScript脚本。

It seems to be quite straight forward to run a pre-defined stored procedure, but I can't find anything on running a script defined in the client-side. 运行预定义的存储过程似乎很简单,但是在运行客户端定义的脚本时我什么也找不到。

As I know, JS scripts (UDFs, SP, Triggers) should be prepared before execution in DocumentDB - precompilation and optimization should be done. 据我所知,在DocumentDB中执行之前,应准备好JS脚本(UDF,SP,触发器)-应该完成预编译和优化。

So as I see you should create that script as usual and run it, as there is no other way. 因此,正如我所见,您应该像往常一样创建该脚本并运行它,因为没有其他方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM