public async Task <HttpResponse> GetNews(string slug) { var entries = await _cache.GetFromCacheOrDirectlyAsync("news-all", GetAllNews, _newsTimeout); var entry = entries.Where(e => e.Slug == slug).FirstOrDefault(); if (entry != null && !_dateComparer.DateNowIsAfterSunriseDate(entry.SunriseDate)) { entry = null; } return(entry == null ? HttpResponse.Failure(HttpStatusCode.NotFound, $"No news found for '{slug}'") : HttpResponse.Successful(_newsContentfulFactory.ToModel(entry))); }