Beispiel #1
0
        private IQueryable <T> GetPermittedEntity <T>(IQueryable <T> entitySet)
        {
            var permissionPredicate = (Expression <Func <T, bool> >)MapperConfig.GetWhereExpression(typeof(T), CurrentUser);

            if (permissionPredicate != null)
            {
                entitySet = entitySet.Where(permissionPredicate);
            }
            return(entitySet);
        }