Class Specification<T>
Represents the base class for specifications.
Inheritance
System.Object
Specification<T>
Implements
Namespace: Volo.Abp.Specifications
Assembly: Volo.Abp.Specifications.dll
Syntax
public abstract class Specification<T> : object, ISpecification<T>
Type Parameters
Name | Description |
---|---|
T | The type of the object to which the specification is applied. |
Methods
IsSatisfiedBy(T)
Returns a
Declaration
public virtual bool IsSatisfiedBy(T obj)
Parameters
Type | Name | Description |
---|---|---|
T | obj | The object to which the specification is applied. |
Returns
Type | Description |
---|---|
System.Boolean | True if the specification is satisfied, otherwise false. |
ToExpression()
Gets the LINQ expression which represents the current specification.
Declaration
public abstract Expression<Func<T, bool>> ToExpression()
Returns
Type | Description |
---|---|
Expression<Func<T, System.Boolean>> | The LINQ expression. |
Operators
Implicit(Specification<T> to Expression<Func<T, Boolean>>)
Implicitly converts a specification to expression.
Declaration
public static implicit operator Expression<Func<T, bool>>(Specification<T> specification)
Parameters
Type | Name | Description |
---|---|---|
Specification<T> | specification |
Returns
Type | Description |
---|---|
Expression<Func<T, System.Boolean>> |