Exemplo n.º 1
0
        public void FindAllTest()
        {
            string        connectionString = "demo.txt";
            LiteDbManager target           = new LiteDbManager(connectionString, "demo");
            var           result           = target.FindAll <Demo>();

            Assert.True(result.Count > 0);
        }
Exemplo n.º 2
0
        public void InsertTest()
        {
            var demo = new Demo {
                Id = Guid.NewGuid().ToString("n"), Name = "测试"
            };
            string        connectionString = "demo.txt";
            LiteDbManager target           = new LiteDbManager(connectionString, "demo");
            BsonValue     inserted         = target.Insert <Demo>(demo);

            Assert.NotNull(inserted);

            var result = target.FindAll <Demo>();

            Assert.True(result.Count > 0);
        }