示例#1
0
        public void TestWhereAndAll()
        {
            var repository = new RepositoryMsSql <DictInfo>(Conn);
            var rst        = repository.Where(x => x.DictID > 106091 && !x.Deleted);
            var model      = rst.FirstOrDefault();

            Assert.False(null == model);
            var all    = repository.All();
            var model2 = all.Find(x => x.DictID == model.DictID);

            Assert.False(null == model2);
            Assert.Equal(model.Deleted, model2.Deleted);
            Assert.Equal(model.CreateTime, model2.CreateTime);
            Assert.Equal(model.Remark, model2.Remark);
            Assert.Equal(model.DictName, model2.DictName);
        }
示例#2
0
 public void QueryWhenField()
 {
     var repository = new RepositoryMsSql <Articles>(Conn);
     var result     = repository.All();
 }