Esempio n. 1
0
        protected virtual IQueryable <TData> GeneratePredicateWithPermissionScopeCompanyAndUser <TAuthenticationToken>(QueryPredicate queryPredicate, IQueryable <TData> leftHandQueryable)
        {
            var queryStrategy = GetNullQueryStrategy() as QueryStrategy;

            if (queryStrategy == null)
            {
                return(null);
            }

            if (queryPredicate.Name != GetFunctionNameOfType <TAuthenticationToken>(queryStrategy.WithPermissionScopeCompanyAndUser))
            {
                return(null);
            }

            return(OnGeneratePredicateWithPermissionScopeCompanyAndUser <TAuthenticationToken>(queryPredicate, leftHandQueryable));
        }
Esempio n. 2
0
 /// <summary>
 /// Override to build an <see cref="IQueryable"/> from the <paramref name="queryPredicate"/> and an optional <paramref name="leftHandQueryable"/>.
 /// </summary>
 protected abstract IQueryable <TData> GeneratePredicate(QueryPredicate queryPredicate, IQueryable <TData> leftHandQueryable = null);
Esempio n. 3
0
 protected virtual IQueryable <TData> OnGeneratePredicateWithPermissionScopeCompany <TAuthenticationToken>(QueryPredicate queryPredicate, IQueryable <TData> leftHandQueryable)
 {
     return(leftHandQueryable ?? GetEmptyQueryPredicate());
 }
Esempio n. 4
0
 protected virtual IQueryable <TData> OnGeneratePredicateWithPermissionScopeCompanyAndUser <TAuthenticationToken>(QueryPredicate queryPredicate, IQueryable <TData> leftHandQueryable)
 {
     return(leftHandQueryable ?? DataStore);
 }