Esempio n. 1
0
        private Expression OrgMembersOnly(CMSDataContext db, ParameterExpression parm)
        {
            var tag = db.OrgMembersOnlyTag2();
            Expression <Func <Person, bool> > pred = p =>
                                                     p.Tags.Any(t => t.Id == tag.Id);

            return(Expression.Convert(Expression.Invoke(pred, parm), typeof(bool)));
        }
Esempio n. 2
0
 private Expression OrgMembersOnly(CMSDataContext db, ParameterExpression parm)
 {
     var tag = db.OrgMembersOnlyTag2();
     Expression<Func<Person, bool>> pred = p =>
         p.Tags.Any(t => t.Id == tag.Id);
     return Expression.Convert(Expression.Invoke(pred, parm), typeof(bool));
 }