Beispiel #1
0
        /// <summary>
        /// Concatenate old predicate (And) passed predicate.
        /// </summary>
        /// <param name="predicate">condition to be concatenated.</param>
        /// <returns></returns>
        public IQueryConstraints <T> AndAlso(Expression <Func <T, bool> > predicate)
        {
            if (predicate == null)
            {
                throw new ArgumentNullException(nameof(predicate));
            }

            if (Predicate == null)
            {
                return(Where(predicate));
            }

            Predicate = Predicate.AndAlso(predicate);

            return(this);
        }
Beispiel #2
0
 public ISpecification <T> AndAlso(Expression <Func <T, bool> > predicate)
 {
     return(Instanciate(Predicate.AndAlso(predicate), FetchStrategy));
 }
Beispiel #3
0
 public ISpecification <T> AndAlso(ISpecification <T> specification)
 {
     return(Instanciate(Predicate.AndAlso(specification.Predicate), InstanciateFetchStrategy(specification.FetchStrategy)));
 }
 public ISpecification <T> AndAlso(Expression <Func <T, bool> > predicate)
 {
     return(new Specification <T>(Predicate.AndAlso(predicate)));
 }
 public ISpecification <T> AndAlso(ISpecification <T> specification)
 {
     return(new Specification <T>(Predicate.AndAlso(specification.Predicate)));
 }