예제 #1
0
        public IActionResult Update(Gun gun)
        {
            GunOrganizator gunOrganizator = new GunOrganizator(gun);

            gunHistory.History.Push(gunOrganizator.SaveState());
            return(RedirectToAction("Index"));
        }
예제 #2
0
        public IActionResult Updat2(Gun gun)
        {
            GunOrganizator gunOrganizator = new GunOrganizator(gun);

            gunOrganizator.RestoreState(gunHistory.History.Pop());
            gun = gunOrganizator.SaveState();
            gunRepo.Update(gun);
            return(RedirectToAction("Index"));
        }