public ActionResult FavoriteHouses() { Dictionary <House, int> houseVotes = new Dictionary <House, int>(); List <House> houses = houseDAL.GetAllHouses(); foreach (House h in houses) { int vote = surveyDAL.GetVotes(h.HouseCode); if (vote > 0) { houseVotes.Add(h, vote); } } return(View("FavoriteHouses", houseVotes)); }
public ActionResult FavoriteParks() { Dictionary <Park, int> parkVotes = new Dictionary <Park, int>(); List <Park> parks = parkDAL.GetAllParks(); foreach (Park p in parks) { int vote = surveyDAL.GetVotes(p.ParkCode); if (vote > 0) { parkVotes.Add(p, vote); } } return(View("FavoriteParks", parkVotes)); }