ObjectTransactionSearchTObject Method |
Searches for objects, matching the predicate in both the committed objects in the data source and the
uncommitted objects in the transaction.
Namespace:
Aloe.SystemFrameworks.Domain
Assembly:
Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntaxpublic IEnumerable<TObject> Search<TObject>(
Expression<Func<TObject, bool>> predicate,
int maxRows = 0
)
where TObject : DomainObject
Public Function Search(Of TObject As DomainObject) (
predicate As Expression(Of Func(Of TObject, Boolean)),
Optional maxRows As Integer = 0
) As IEnumerable(Of TObject)
public:
generic<typename TObject>
where TObject : DomainObject
IEnumerable<TObject>^ Search(
Expression<Func<TObject, bool>^>^ predicate,
int maxRows = 0
)
member Search :
predicate : Expression<Func<'TObject, bool>> *
?maxRows : int
(* Defaults:
let _maxRows = defaultArg maxRows 0
*)
-> IEnumerable<'TObject> when 'TObject : DomainObject
Parameters
- predicate
- Type: System.Linq.ExpressionsExpressionFuncTObject, Boolean
The predicate. - maxRows (Optional)
- Type: SystemInt32
The maximum rows.
Type Parameters
- TObject
- The type of the objects to search for.
Return Value
Type:
IEnumerableTObject
IEnumerable for the objects.
RemarksSearchTObject(ExpressionFuncTObject, Boolean, Int32) always queries both the data source and the local cache to find all objects,
which match the predicate. For variants, that try to work out only locally if possible, check
FindFirstOrDefault variants.
See Also