using System; using System.Linq.Expressions; namespace Abp.Specifications { /// /// Represents the specification which is represented by the corresponding /// LINQ expression. /// /// The type of the object to which the specification is applied. public class ExpressionSpecification : Specification { private readonly Expression> _expression; /// /// Initializes a new instance of ExpressionSpecification<T> class. /// /// The LINQ expression which represents the current /// specification. public ExpressionSpecification(Expression> expression) { _expression = expression; } /// /// Gets the LINQ expression which represents the current specification. /// /// The LINQ expression. public override Expression> ToExpression() { return _expression; } } }