Exemplo n.º 1
0
        private void MinMaxCommon(UltraLiteCollection <DateTimeTest> coll)
        {
            var searchdatetime = new DateTime(2018, 02, 22, 0, 0, 10);

            var min = coll.Min("Date").AsDateTime;
            var max = coll.Max("Date").AsDateTime;

            var smaller = coll.FindOne(Query.LT("Date", searchdatetime));
            var greater = coll.FindOne(Query.GT("Date", searchdatetime));

            var all = coll.FindAll().ToList();

            var linqmin = all.Min(x => x.Date);
            var linqmax = all.Max(x => x.Date);

            Assert.AreEqual(min, linqmin);
            Assert.AreEqual(max, linqmax);
        }
Exemplo n.º 2
0
        public async Task <IEnumerable <string> > GetAllKeys()
        {
            var result = collection.FindAll().Map(x => GetKeyFromBsonDoc(x));

            return(await fallbackStore.ConcatWithKeys(result));
        }