예제 #1
0
        static void oldEntityUpdate()
        {
            PayUserRepository payUserRepository = new PayUserRepository(new PayEntities());
            Users             user = payUserRepository.Find(i => i.ID == 1);

            user.PassWord = "******";
            payUserRepository.Modify(user, i => i.PassWord);
        }
예제 #2
0
        static void newEntityUpdate()
        {
            PayUserRepository payUserRepository = new PayUserRepository(new PayEntities());

            payUserRepository.Modify(new Users
            {
                ID       = 1,
                PassWord = "******" + DateTime.Now,
            }, i => i.PassWord);
        }
예제 #3
0
        static void oldEntityFindAndNewUpdate()
        {
            PayUserRepository payUserRepository = new PayUserRepository(new PayEntities());
            Users             user = payUserRepository.Find(i => i.ID == 1);

            payUserRepository.Modify(new Users
            {
                ID       = 1,
                PassWord = "******" + DateTime.Now,
            }, i => i.PassWord);
        }