Ejemplo n.º 1
0
        public virtual ActionResult Create(DogProfile dog)
        {
            var model = new DogCertification { DogProfileID = dog.ProfileID };

            SetDogViewBag(dog);

            return View(model);
        }
Ejemplo n.º 2
0
        public virtual ActionResult Edit(DogCertification model)
        {
            if (!ModelState.IsValid)
            {
                var dog = _dogProfileRepo.GetById(model.DogProfileID);

                SetDogViewBag(dog);

                return View(model);
            }

            _dogCertificationRepo.Update(model);

            return RedirectToAction("Index", new { dog = model.DogProfileID });
        }