Beispiel #1
0
        /// <summary>
        /// Gets *all* reference items for the type.
        /// The optional context date will not restrict the result set, only prepare the items IsActive* methods.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="contextDate">All items are returned, but their ContextDate will be set to this date.</param>
        /// <returns></returns>
        public IEnumerable <ReferenceItem> GetAll(ReferenceType type, DateTime?contextDate = null)
        {
            if (type == ReferenceType.None)
            {
                return(new List <ReferenceItem>());
            }

            var rds = new ReferenceDataService(_connection);
            var ri  = rds.GetReferenceItems(type, contextDate)
                      .OrderBy(o => o.DisplayOrder)
                      .ThenBy(o => o.Description);

            return(ri);
        }
Beispiel #2
0
        /// <summary>
        /// Stops db dependency caching.
        /// </summary>
        public void StopDependencyCaching()
        {
            var refService = new ReferenceDataService(_connection);

            refService.StopSqlDependencyService();
        }