Returns a collection of objects that match the specified search criteria.
This function utilises any subsets, ordering or table joins specified in this
collection. To add a set of conditions to the objSearchCriteria object with
higher precendance use the "Add(SQLConditions)" overloaded as this will wrap
the conditions within parentheses.
Namespace: DatabaseObjects.GenericAssembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0
Syntax
Visual Basic |
---|
Protected Function ObjectsSearch ( _
objSearchCriteria As SQLConditions _
) As IList(Of T) |
Parameters
- objSearchCriteria
- Type: DatabaseObjects.SQL..::..SQLConditions
The criteria to search for within this collection. To add set a of conditions with
with higher precendance use the "Add(SQLConditions)" overloaded function as this
will wrap the conditions within parentheses.
Return Value
IList (System.Collections.IList)
Remarks
Examples
CopyC#
Public Function Search(ByVal objSearchCriteria As Object, ByVal eType As SearchType) As IList
Dim objConditions As SQL.SQLConditions = New SQL.SQLConditions
Select Case eType
Case SearchType.DescriptionPrefix
objConditions.Add("ProductName", SQL.ComparisonOperator.Like, objSearchCriteria & "%")
Case SearchType.Description
objConditions.Add("ProductName", SQL.ComparisonOperator.Like, "%" & objSearchCriteria & "%")
End Select
Return MyBase.ObjectsSearch(objConditions)
End Function
See Also