private static async Task DeleteUserDefinedFunction(IDocumentClient client, string udfId)
        {
            Uri udfUri = UriFactory.CreateUserDefinedFunctionUri("mydb", "mystore", udfId);

            await client.DeleteUserDefinedFunctionAsync(udfUri);

            Console.WriteLine($"Deleted user defined function: {udfId}");
        }
Example #2
0
        private static async Task DeleteUserDefinedFunctions(IDocumentClient client, Uri collectionUri)
        {
            Console.WriteLine("Deleting user defined functions");
            IEnumerable <UserDefinedFunction> userDefinedFunctions = client.CreateUserDefinedFunctionQuery(collectionUri).AsEnumerable();

            foreach (UserDefinedFunction userDefinedFunction in userDefinedFunctions)
            {
                await client.DeleteUserDefinedFunctionAsync(userDefinedFunction.SelfLink);
            }
        }