/// <summary>
        /// Search for NonStandardHoliday items
        /// </summary>
        /// <param name="currentUser"></param>
        /// <param name="user"></param>
        /// <param name="appID"></param>
        /// <param name="overrideID"></param>
        /// <param name="searchCriteria"></param>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <param name="includeInActive"></param>
        /// <param name="specification"></param>
        /// <param name="dataRepository"></param>
        /// <param name="uow"></param>
        /// <returns></returns>
        public NonStandardHolidaySearchVMDC SearchNonStandardHoliday(string currentUser, string user, string appID, string overrideID, NonStandardHolidaySearchCriteriaDC searchCriteria, int page, int pageSize, bool includeInActive,
                                                                     ISpecification <NonStandardHoliday> specification, IRepository <NonStandardHoliday> dataRepository, IUnitOfWork uow)
        {
            try
            {
                #region Parameter validation

                // Validate parameters
                if (string.IsNullOrEmpty(currentUser))
                {
                    throw new ArgumentOutOfRangeException("currentUser");
                }
                if (string.IsNullOrEmpty(user))
                {
                    throw new ArgumentOutOfRangeException("user");
                }
                if (string.IsNullOrEmpty(appID))
                {
                    throw new ArgumentOutOfRangeException("appID");
                }
                if (null == dataRepository)
                {
                    throw new ArgumentOutOfRangeException("dataRepository");
                }
                if (null == specification)
                {
                    throw new ArgumentOutOfRangeException("specification");
                }
                if (null == uow)
                {
                    throw new ArgumentOutOfRangeException("uow");
                }

                #endregion

                using (uow)
                {
                    // Evaluate search criteria if supplied
                    if (null != searchCriteria)
                    {
                        EvaluateNonStandardHolidaySearchCriteria(searchCriteria, ref specification);
                    }

                    if (!includeInActive)
                    {
                        ISpecification <NonStandardHoliday> isActiveSpecification = new Specification <NonStandardHoliday>(x => x.IsActive == true);
                        specification = specification.And(isActiveSpecification);
                    }

                    // Set default sort expression
                    System.Linq.Expressions.Expression <Func <NonStandardHoliday, DateTime> > sortExpression = x => x.Date;

                    //Sort holidays in descending order
                    bool isAscendingSort = false;

                    // Find all items that satisfy the specification created above.
                    IEnumerable <NonStandardHoliday> dataEntities = dataRepository.Find <DateTime>(specification, sortExpression, isAscendingSort, page, pageSize);

                    // Get total count of items for search critera
                    int itemCount = dataRepository.Count(specification);

                    NonStandardHolidaySearchVMDC results = new NonStandardHolidaySearchVMDC();

                    // Convert to data contracts
                    List <NonStandardHolidaySearchMatchDC> destinations = Mapper.Map <IEnumerable <NonStandardHoliday>, List <NonStandardHolidaySearchMatchDC> >(dataEntities);

                    results.MatchList      = destinations;
                    results.SearchCriteria = searchCriteria;
                    results.RecordCount    = itemCount;

                    return(results);
                }
            }
            catch (Exception e)
            {
                //Prevent exception from propogating across the service interface
                ExceptionManager.ShieldException(e);

                return(null);
            }
        }
 // Partial method for evaluation of NonStandardHoliday search criteria
 partial void EvaluateNonStandardHolidaySearchCriteria(NonStandardHolidaySearchCriteriaDC searchCriteria, ref ISpecification <NonStandardHoliday> specification);
        /// <summary>
        /// Search for NonStandardHoliday items
        /// </summary>
        /// <param name="currentUser"></param>
        /// <param name="user"></param>
        /// <param name="appID"></param>
        /// <param name="overrideID"></param>
        /// <param name="searchCriteria"></param>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <param name="includeInActive"></param>
        /// <returns></returns>
        public NonStandardHolidaySearchVMDC SearchNonStandardHoliday(string currentUser, string user, string appID, string overrideID, NonStandardHolidaySearchCriteriaDC searchCriteria, int page, int pageSize, bool includeInActive)
        {
            // Create unit of work
            IUnitOfWork uow = new UnitOfWork(currentUser);

            // Create repository
            IRepository <NonStandardHoliday> dataRepository = new Repository <NonStandardHoliday>(uow.ObjectContext, currentUser, user, appID, overrideID);

            // Create specification for filtering
            ISpecification <NonStandardHoliday> specification = new Specification <NonStandardHoliday>();

            // Call overload with injected objects
            return(SearchNonStandardHoliday(currentUser, user, appID, overrideID, searchCriteria, page, pageSize, includeInActive, specification, dataRepository, uow));
        }