Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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());
        }
Ejemplo n.º 4
0
        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());
        }
Ejemplo n.º 6
0
        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());
        }
Ejemplo n.º 7
0
        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());
        }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
        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());
        }