public List <NotificationsSettingsDto> GetUpdateNotifications(List <NotificationsSettingsDto> listFilterNotificationsSettings, bool summaryView)
        {
            using (SecurityManagmentEntities context = new SecurityManagmentEntities())//GetDataBaseContext())
            {
                List <ObjectParameter> parameters = new List <ObjectParameter> {
                    new ObjectParameter("StartDate", new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second))
                };

                parameters.AddRange(ConditionalQuery.GenerateParametersConditionalQuery(listFilterNotificationsSettings));
                string filterDate = (summaryView ? "SummaryEndDate" : "DashboardEndDate");

                return(context.NotificationsSettings
                       .Include(ConditionalQuery.GenerateIncludes(listFilterNotificationsSettings))
                       .Where("(" + ConditionalQuery.GenerateConditionalQuery(listFilterNotificationsSettings) + ") AND it." + filterDate + " >= @StartDate", parameters.ToArray()).AsParallel()
                       .Select(Mapper.Map <NotificationsSettings, NotificationsSettingsDto>).ToList());
            }
        }
        /// <summary>
        /// Gets list object of the table Application.
        /// </summary>
        /// <param name="paginationDto">Attributes to apply the pagination.</param>
        /// <param name="listFilterGeneric">List that contains the DTOs from Application table that filter the query.</param>
        /// <returns>List object of the table Application.</returns>
        /// <author>Mauricio Suárez.</author>
        private List <ApplicationDto> ExecutePaginated(PaginationDto paginationDto, List <ApplicationDto> listApplicationDto)
        {
            using (SecurityManagmentEntities context = new SecurityManagmentEntities())//GetDataBaseContext())
            {
                int skipRol = paginationDto.Skip;

                if (string.IsNullOrEmpty(paginationDto.SortExpression))
                {
                    paginationDto.SortExpression = "IdApplication";
                    //paginationDto.SortDirection = SortDirection.Ascending.ToString();
                }

                return(context.Application
                       .Include(ConditionalQuery.GenerateIncludes(listApplicationDto))
                       .Where(ConditionalQuery.GenerateConditionalQuery(listApplicationDto), ConditionalQuery.GenerateParametersConditionalQuery(listApplicationDto)).AsParallel()
                       .AsQueryable()
                       .OrderBy(paginationDto.SortExpression + " " + paginationDto.SortDirectionAbbreviation)
                       .Skip(skipRol)
                       .Take(paginationDto.PageSize)
                       .Select(Mapper.Map <Application, ApplicationDto>).ToList());
            }
        }