public void GetParkTest() { //Arrange IParkDao parksDoa = new ParkDao(_connectionString); //Act IList <Park> parks = parksDoa.GetAllParks(); //Assert Assert.AreEqual(_myPark, parks.Count); Assert.AreEqual("ZZZ", parks[parks.Count - 1].ParkCode); }
private List <SelectListItem> GetParksList() { IParkDao parkDao = new ParkDao(Startup.ConnectionString); List <SelectListItem> parks = new List <SelectListItem>(); foreach (Park park in parkDao.GetAllParks()) { parks.Add(new SelectListItem(park.ParkName, park.ParkCode)); } return(parks); }