public IActionResult Modify(int id, Shepard shepard) { Sheep sheep = Sheep.FindASheep(id); if (sheep != null) { sheep.Shepards.Add(shepard); //Sheep.UpdateASheep(sheep); return(PartialView("../Home/_ListShepard", sheep.Shepards)); } return(RedirectResult("Index", "Home")); }
public IActionResult Edit(int sheepId) { return(View(Sheep.FindASheep(sheepId))); }