public ActionResult Adopted(string newName, string type) { Dog newDog; if (type == "Golden Retreiver") { newDog = new GoldenRetriever(newName); } else if (type == "Boston Terrier") { newDog = new BostonTerrier(newName); } else if (type == "German Shephard") { newDog = new GermanShepard(newName); } else if (type == "King Charles Cavalier") { newDog = new KingCharlesCavalier(newName); } else { newDog = new GermanShepard("dog"); } Home.home.AdoptDog(newDog); return(View(newDog)); }
public ActionResult Index() { List <Dog> Dogs = new List <Dog>(); BostonTerrier IceT = new BostonTerrier("Ice-T"); GoldenRetriever Pete = new GoldenRetriever("Pete"); KingCharlesCavalier Chuck = new KingCharlesCavalier("Chuck"); GermanShepard Dolph = new GermanShepard("Dolph"); return(View()); }