Feature | Is supported |
---|---|
Null safe | |
Validation | |
EF Core | |
EF 6 |
Validation result
Error
"Value is False".
"Value is True" - for negation.
Info
Checks if candidate is True.
Usage
var spec = Specification.True();
spec.IsSatisfiedBy(true); // true
spec.IsSatisfiedBy(false); // false
As property
var customerSpec = Specification.True<Customer>(c => c.IsActive);
customerSpec.IsSatisfiedBy(new Customer { IsActive = true }); // true
customerSpec.IsSatisfiedBy(new Customer { IsActive = false }); // false