public ActionResult CreateOrUpdateSkill(DogSkill dogSkill) { _dogSkillRepo.Update(dogSkill); return RedirectToAction("GetSkill", "Skills"); }
public ActionResult CreateOrUpdateSkill(DogSkill dogSkill) { throw new NotImplementedException(); }
public ActionResult CreateOrUpdateDogSkill(DogSkill dogSkill) { var user = _userRepo.Where(u => u.Email == this.HttpContext.User.Identity.Name).FirstOrDefault(); if (user.IsUserAdminOrTrainer()) { if (dogSkill.DogSkilID == 0) { _dogSkillRepo.Insert(dogSkill); } else { _dogSkillRepo.Update(dogSkill); } return RedirectToAction("ReadDog", new { id = dogSkill.DogProfileID }); } return RedirectToAction("Error403", "Error"); }