public async Task Paging()
        {
            UserRepAsync userRep = new UserRepAsync();
            List <User>  list    = await userRep.GetListAsync(limit : 10, skip : 10);

            User user = list.First();
            long id   = user.ID;

            user = await userRep.GetAsync(user.ID);

            Assert.AreEqual(user.ID, id);
        }
        public async Task FindOneAndUpdate()
        {
            User         user;
            UserRepAsync userRep = new UserRepAsync();

            user = await userRep.GetAsync(2);

            user.Age       += 1;
            user.CreateTime = DateTime.Now;

            user = await userRep.FindOneAndUpdateAsync(filterExp : x => x.ID == user.ID, updateEntity : user, isUpsert : false);
        }
        public async Task UpdateOne_updateEntity()
        {
            User         user    = new User();
            UserRepAsync userRep = new UserRepAsync();

            //新增
            user = await userRep.GetAsync(x => x.ID == 1);

            user.Age       += 1;
            user.CreateTime = DateTime.Now;
            user.Name       = "axxxx";

            await userRep.UpdateOneAsync(x => x.Name == "axxxx", user, false);



            //根据条件查询,然后修改
            user = await userRep.GetAsync(x => x.Name == "axxxx");

            user.Age = 12;
            await userRep.UpdateOneAsync(x => x.ID == user.ID, user, true);
        }
        public async Task Get()
        {
            UserRepAsync userRep = new UserRepAsync();
            List <User>  list    = await userRep.GetListAsync(limit : 10);

            User user = list.First();
            long id   = user.ID;

            user = await userRep.GetAsync(user.ID);

            Assert.AreEqual(user.ID, id);

            user = await userRep.GetAsync(x => x.Name == "aa");

            Assert.AreNotEqual(user, null);
            user = await userRep.GetAsync(x => x.Name == "aa", x => new { x.Name });

            Assert.AreNotEqual(user, null);
            user = await userRep.GetAsync(x => x.Name == "aa", x => new { x.CreateTime });

            Assert.AreNotEqual(user, null);

            user = await userRep.GetAsync(x => x.Name == "aa" && x.CreateTime > DateTime.Parse("2015/10/20"));

            Assert.AreNotEqual(user, null);
            Builders <User> .Filter.Eq("Name", "aa");

            var filter = UserRepAsync.Filter.Eq(x => x.Name, "aa") & UserRepAsync.Filter.Eq(x => x.ID, 123);

            UserRepAsync.Sort.Descending("_id");

            user = await userRep.GetAsync(Builders <User> .Filter.Eq("Name", "aa"), null, Builders <User> .Sort.Descending("_id"));

            Assert.AreNotEqual(user, null);

            user = await userRep.GetAsync(filter : Builders <User> .Filter.Eq("Name", "aa"), projection : Builders <User> .Projection.Include(x => x.Name));

            Assert.AreNotEqual(user, null);
        }