public TicketsWithCommentsAndDevelopersSpecification(TicketSpecParams ticketParams)
            : base(x =>
                   (string.IsNullOrEmpty(ticketParams.Search) || x.Number.ToLower().Contains(ticketParams.Search) ||
                    x.Title.ToLower().Contains(ticketParams.Search) ||
                    x.Description.ToLower().Contains(ticketParams.Search)) &&
                   (!ticketParams.AssigneeId.HasValue || x.AssigneeId == ticketParams.AssigneeId))
        {
            AddInclude(x => x.Comments);
            AddInclude(x => x.Assignee);

            AddOrderBy(x => x.Number);
            ApplyPaging(ticketParams.PageSize * (ticketParams.PageIndex - 1), ticketParams.PageSize);

            if (!string.IsNullOrEmpty(ticketParams.Sort))
            {
                switch (ticketParams.Sort)
                {
                case "numberAsc":
                    AddOrderBy(x => x.Number);
                    break;

                case "numberDesc":
                    AddOrderByDescending(x => x.Number);
                    break;

                default:
                    AddOrderBy(x => x.CreateDate);
                    break;
                }
            }
        }
 public TicketWithFiltersForCountSpecification(TicketSpecParams ticketParams)
     : base(x =>
            (string.IsNullOrEmpty(ticketParams.Search) || x.Number.ToLower().Contains(ticketParams.Search) ||
             x.Title.ToLower().Contains(ticketParams.Search) ||
             x.Description.ToLower().Contains(ticketParams.Search)) &&
            (!ticketParams.AssigneeId.HasValue || x.AssigneeId == ticketParams.AssigneeId))
 {
 }