Ejemplo n.º 1
0
        public GroupFilterTerm Or(params IFilterTerm[] terms)
        {
            var term = new OrFilterTerm(terms);

            this.terms.Add(term);
            return(term);
        }
 public GroupFilterTerm Or(params IFilterTerm[] terms) {
     var term = new OrFilterTerm(terms);
     this.terms.Add(term);
     return term;
 }
        // TODO avoid ancient non generic collections
        private IList<Member> GetMembersByIds(IList oids)
        {
            if (oids.Count == 0) {
                return new List<Member>();
            }

            var memberType = metaModel.GetAssetType(MemberType);

            var terms = new OrFilterTerm();

            foreach(var oid in oids) {
                var term = new FilterTerm(memberType.GetAttributeDefinition(IdAttribute));
                term.Equal(oid);
                terms.Or(term);
            }

            var members = queryBuilder.Query(MemberType, terms).Select(asset => new Member(asset)).ToList();
            return members;
        }