public IQueryable <Language> GetLanguages() { var retVal = _cacheManager.Get(GetType(), context => { context.Monitor(_clock.When(TimeSpan.FromMinutes(10))); // cache for 10 mins return(_languageRepositoryAsync.Queryable().OrderBy(x => x.LanguageName).ToList()); }); return(retVal.ToAsyncEnumerable()); }
public IQueryable <ProductCategory> GetProductCategorys() { var retVal = _cacheManager.Get(GetType(), context => { context.Monitor(_clock.When(TimeSpan.FromMinutes(10))); // cache for 10 mins return(_productCategoryRepositoryAsync.Queryable().Where(x => x.IsActive).OrderBy(x => x.ProductCategoryName).ToList()); }); return(retVal.AsQueryable()); }
public IQueryable <Currency> GetCurrencies() { var retVal = _cacheManager.Get(GetType(), context => { context.Monitor(_clock.When(TimeSpan.FromMinutes(10))); // cache for 10 mins return(_currencyRepositoryAsync.Queryable().OrderBy(x => x.CurrencyName).ToList()); }); return(retVal.AsQueryable()); }
public IQueryable <TimeZone> GeTimeZones() { var retVal = _cacheManager.Get(GetType(), context => { context.Monitor(_clock.When(TimeSpan.FromMinutes(10))); // cache for 10 mins return(_timeZoneRepositoryAsync.Queryable().OrderBy(x => x.DisplayIndex).ToList()); }); return(retVal.ToAsyncEnumerable()); }
public IQueryable <AdTagTemplate> GetAdTagTemplates() { var retVal = _cacheManager.Get(GetType(), context => { context.Monitor(_clock.When(TimeSpan.FromMinutes(10))); // cache for 10 mins return(_adTagTemplateRepositoryAsync.Queryable().Where(x => x.IsActive).OrderBy(x => x.Position).ToList()); }); return(retVal.ToAsyncEnumerable()); }
public IQueryable <DayPart> GetDayParts() { var retVal = _cacheManager.Get(GetType(), context => { context.Monitor(_clock.When(TimeSpan.FromMinutes(10))); // cache for 10 mins var source = _dayPartRepositoryAsync.Queryable(); return(source.Where(x => x.IsEnabled).OrderBy(x => x.DayPartId).ToList()); }); return(retVal.ToAsyncEnumerable()); }
public IQueryable <Partner> GetPartners() { var retVal = _cacheManager.Get(GetType(), context => { context.Monitor(_clock.When(TimeSpan.FromMinutes(10))); // cache for 10 mins var source = _partnerRepositoryAsync.Queryable(); return(source.OrderBy(x => x.PartnerName).ToList()); }); return(retVal.ToAsyncEnumerable()); }
private dynamic ToDynamicRow(AnalyzedIssue issue, Mapper mapper) { dynamic row = mapper.Map <ExpandoObject>(issue); row.OriginalEstimate = issue.OriginalEstimate.HasValue ? TimeSpan.FromMinutes(issue.OriginalEstimate.Value).TotalDays : (double?)null; row.TimeSpent = issue.TimeSpent.HasValue ? TimeSpan.FromMinutes(issue.TimeSpent.Value).TotalDays : (double?)null; row.IsValid = TasksSource.IsValidIssue(issue); row.DurationDays = issue.Duration?.TotalDays; return(row); }
public IQueryable <Vertical> GetVerticals() { var retVal = _cacheManager.Get(GetType(), context => { context.Monitor(_clock.When(TimeSpan.FromMinutes(10))); // cache for 10 mins var source = _verticalRepositoryAsync.Queryable() .Include(x => x.Vertical_ParentVerticalId) .Include(x => x.Verticals); return(source.OrderBy(x => x.VerticalName).ToList()); }); return(retVal.ToAsyncEnumerable()); }