Ejemplo n.º 1
0
        public IEnumerable <SearchQueryCriteria <Client> > GetClientCriterias()
        {
            yield return(Q.MapString(s => new SearchQueryCriteria <Client>(x => x.Email.Contains(s) || x.PhoneNumber.Contains(s) || x.Name.Contains(s))));

            yield return(Deactivated.MapNullable(d => new SearchQueryCriteria <Client>(x => x.DeActivated == d)));

            yield return(RegistrationDate.GetSearchCriteriaFromGenericRange <Client, DateTime>(x => x.CreatedOn));

            if (SearchSex)
            {
                yield return(new SearchQueryCriteria <Client>(x => x.Sex == Sex));
            }
        }