コード例 #1
0
 public async Task <IEnumerable <Station> > GetStationsByTypeId(int stationTypeId)
 {
     try {
         IStationDao stationDao = GetIStationDao();
         return(await stationDao.FindByStationTypeIdAsync(stationTypeId));
     }
     catch (Exception) {
         return(null);
     }
 }
コード例 #2
0
        public async Task TestFindByStationTypeIdAsync()
        {
            int StationTypeId = 1;
            IEnumerable <Station> stations = await stationDao.FindByStationTypeIdAsync(StationTypeId);

            foreach (var station in stations)
            {
                Assert.IsTrue(station.StationTypeId == StationTypeId);
            }
        }