示例#1
0
        public bool MatchEntity(OperationContext context, object entity)
        {
            Util.Check(entity != null, "Entity may not be null.");
            var type         = EntityHelper.GetEntityType(entity);
            var entSetFilter = EntityFilter.GetPredicate(type);

            if (entSetFilter == null)
            {
                return(false);
            }
            var session = EntityHelper.GetSession(entity);
            var result  = entSetFilter.Evaluate((EntitySession)session, entity);

            return(result);
        }