public virtual ActionResult Create(DogProfile dog) { var model = new DogCertification { DogProfileID = dog.ProfileID }; SetDogViewBag(dog); return(View(model)); }
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 })); }