public PaginatedResults <EmployeeGridDto> Search(EmployeeSearch search)
        {
            var query = _employeeRepository.Query.ProjectTo <EmployeeGridDto>(_mapper.ConfigurationProvider);

            if (!search.Filter.IsNotNullOrEmpy() || !search.Filter.HasValue())
            {
                return(_employeeRepository.PaginatedSearch(query, search));
            }

            var filter = search.Filter.ToUpper();
            var cb     = new CriteriaBuilder <EmployeeGridDto>();

            cb.Or(c => c.FirstName != null && c.FirstName.ToUpper().Contains(filter));
            cb.Or(c => c.LastName != null && c.LastName.ToUpper().Contains(filter));
            cb.Or(c => c.Email != null && c.Email.ToUpper().Contains(filter));
            cb.Or(c => c.PhoneNumber != null && c.PhoneNumber.ToUpper().Contains(filter));
            query = query.AsExpandable().Where(cb.GetCondition());
            return(_employeeRepository.PaginatedSearch(query, search));
        }