SpecificationLikeT Method |
Creates a specification that will return the objects for which the specified field matches the specified pattern. The pattern
supports two types of wildcards. The '*' wildcard matches any character (zero or more times) and the '?' wildcard matches exactly one
character.
Namespace:
Enkoni.Framework
Assembly:
Enkoni.Framework.Specifications (in Enkoni.Framework.Specifications.dll) Version: 1.3.0.1
Syntaxpublic static ISpecification<T> Like<T>(
Expression<Func<T, string>> field,
string pattern
)
Public Shared Function Like(Of T) (
field As Expression(Of Func(Of T, String)),
pattern As String
) As ISpecification(Of T)
public:
generic<typename T>
static ISpecification<T>^ Like(
Expression<Func<T, String^>^>^ field,
String^ pattern
)
static member Like :
field : Expression<Func<'T, string>> *
pattern : string -> ISpecification<'T>
Parameters
- field
- Type: System.Linq.ExpressionsExpressionFuncT, String
The field that must match the expression. - pattern
- Type: SystemString
The search-pattern.
Type Parameters
- T
- The type of object that is ultimately selected by the specification.
Return Value
Type:
ISpecificationTA specification that will return only the objects for which the field matches the search-pattern.
See Also