Beispiel #1
0
        public virtual bool TryCreate <TEntity>(IQuerySpecification <TEntity> specification, out IQueryPipe <TEntity> queryPipe)
        {
            if (specification is WhereQuerySpecification <TEntity> whereSpec)
            {
                queryPipe = new WhereQueryPipe <TEntity>(whereSpec.Expression);
                return(true);
            }

            queryPipe = null;
            return(false);
        }
Beispiel #2
0
        public bool TryCreate <TEntity>(IQuerySpecification <TEntity> specification, out IQueryPipe <TEntity> pipe)
            where TEntity : class
        {
            if (specification is IWhereQuerySpecification <TEntity> whereSpec)
            {
                pipe = new WhereQueryPipe <TEntity>(whereSpec.Predicate);
                return(true);
            }

            pipe = null;
            return(false);
        }