Esempio n. 1
0
        public LiteDB_Test(int count)
        {
            _count    = count;
            _filename = "dblite-" + Guid.NewGuid().ToString("n") + ".db";

            var ms   = new MemoryStream();
            var disk = new LiteDB.StreamDiskService(ms);

            //var disk = new FileDiskService(_filename, options);

            _db = new LiteEngine(disk);
        }
Esempio n. 2
0
        public LiteDB_Test2(int count)
        {
            _count    = count;
            _filename = "dblite-" + Guid.NewGuid().ToString("n") + ".db";

            var ms   = new MemoryStream();
            var disk = new LiteDB.StreamDiskService(ms);

            //var disk = new FileDiskService(_filename, options);

            _db = new LiteDatabase(disk);

            _collection = _db.GetCollection <TestDoc>();
        }