示例#1
0
        public void TestUpdateModelField()
        {
            var ddxx = new DictInfo()
            {
                DictID     = 8,
                CreateTime = DateTime.Now,
                Remark     = "PHP是最好的语言"
            };
            var rst = RepoDict.Update(ddxx, x => x.CreateTime, x => x.Remark);

            Assert.Equal(1, rst);
            var ddyy = RepoDict.Find(8);

            Assert.Equal("PHP是最好的语言", ddyy.Remark);
        }
示例#2
0
        public void TestUpdate()
        {
            var ddxx = new DictInfo()
            {
                DictID     = 1,
                CreateTime = DateTime.Now,
                DictType   = 101,
                DictName   = "某层某层会议室",
                Remark     = "今天交流的内容是DapperEx使用",
                Deleted    = true,
                OrderNum   = OrderEnum.optionB
            };
            var rst = RepoDict.Update(ddxx);

            Assert.Equal(1, rst);
            var ddyy = RepoDict.Find(1);

            Assert.Equal("今天交流的内容是DapperEx使用", ddyy.Remark);
        }