Beispiel #1
0
        public async override Task TestFindAllAsync()
        {
            IEnumerable <StationType> fetchedStationTypes = await stationTypeDao.FindAllAsync();

            foreach (StationType t in stationTypes)
            {
                CollectionAssert.Contains(fetchedStationTypes.ToList(), t);
            }
        }
 public async Task <IEnumerable <StationType> > GetAllStationTypes()
 {
     try {
         IStationTypeDao stationDao = GetIStationTypeDao();
         return(await stationDao.FindAllAsync());
     }
     catch (Exception) {
         return(null);
     }
 }
Beispiel #3
0
 public async Task <IEnumerable <StationType> > GetStationTypes()
 {
     try
     {
         return(await stationTypeDao.FindAllAsync());
     }
     catch (Common.Dal.Ado.MySqlException ex)
     {
         throw new BusinessSqlException(ex.Message, ex.InnerException);
     }
 }
Beispiel #4
0
        public async Task <IHttpActionResult> GetStationTypes()
        {
            IStationTypeDao dao = AdoFactory.Instance.GetStationTypeDao("wetr");

            return(Ok(await dao.FindAllAsync()));
        }