예제 #1
0
        /// <inheritdoc />
        public void StoreElement(XElement element, string friendlyName)
        {
            var newKey = new DataProtectionEntity
            {
                FriendlyName = friendlyName,
                Xml          = element.ToString(SaveOptions.DisableFormatting)
            };

            _context.CreateDocumentAsync(_database, _collection, newKey).Wait();
        }
예제 #2
0
        public async void TestOr()
        {
            await Arango.CreateDocumentAsync("test", nameof(Project), new Project
            {
                Key   = Guid.NewGuid(),
                Name  = "B",
                Value = 2
            });

            await Arango.CreateDocumentAsync("test", nameof(Project), new Project
            {
                Key   = Guid.NewGuid(),
                Name  = "C",
                Value = 3
            });

            var test = Arango.AsQueryable <Project>("test").Where(x => x.Value == 1 || x.Value == 2).ToList();

            foreach (var t in test)
            {
                Assert.True(t.Value == 1 || t.Value == 2);
            }
        }