Пример #1
0
 public async Task <IEnumerable <OutageInformation> > GetPlannedOutages(OutageQuery query)
 {
     return(mapper.Map <IEnumerable <OutageInformation> >(
                await((DataServiceQuery <era_portalbanner>)essContext.era_portalbanners
                      .Where(pb => pb.era_portal == (int?)query.PortalType &&
                             pb.era_startdisplaydate <= query.DisplayDate &&
                             pb.era_enddisplaydate >= query.DisplayDate)).GetAllPagesAsync()));
 }
Пример #2
0
 public async Task <IEnumerable <OutageInformation> > GetPlannedOutages(OutageQuery query)
 {
     return(await cache.GetOrSet($"{PlannedOutagesCacheKey}:{query.PortalType}", () => internalRepository.GetPlannedOutages(query), CacheEntryLifetime));
 }