private static async Task DeleteUser(IDocumentClient client, string userId)
        {
            Console.WriteLine($">>> Delete User {userId} <<<");

            Uri userUri = UriFactory.CreateUserUri("mydb", userId);
            await client.DeleteUserAsync(userUri);

            Console.WriteLine($"Deleted user {userId}");
        }
Exemple #2
0
        private static async Task DeleteUsers(IDocumentClient client)
        {
            Console.WriteLine("Deleting users");
            Uri databaseUri          = UriFactory.CreateDatabaseUri("mydb");
            IEnumerable <User> users = client.CreateUserQuery(databaseUri).AsEnumerable();

            foreach (User user in users)
            {
                await client.DeleteUserAsync(user.SelfLink);
            }
        }