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"));
        }
示例#2
0
 public IActionResult Edit(int sheepId)
 {
     return(View(Sheep.FindASheep(sheepId)));
 }