コード例 #1
0
        public void DropNodesByProperties()
        {
            using (var client = new NeoClient(URL, USER, PASSWORD, CONFIG))
            {
                client.Connect();

                var userList = new List <User>();

                for (int i = 0; i < 10; i++)
                {
                    userList.Add(new User
                    {
                        Email     = "*****@*****.**",
                        FirstName = $"FakeFirstName{i}",
                        LastName  = $"FakeLastName{i}"
                    });
                }

                var properties = new Dictionary <string, object>()
                {
                    { nameof(User.Email), "*****@*****.**" },
                };

                userList.ForEach((user) => client.Add(user));

                int nodesDeleted = client.DropByProperties <User>(properties);

                nodesDeleted.Should().Be(10);
            }
        }