Where Method (IFilteredRecordCollection<TRecord>)
- Last UpdatedApr 08, 2026
- 1 minute read
Filters a sequence of records based on a predicate.
IFilteredRecordCollection<TRecord> Where(
Func<TRecord,bool> predicate,
Nullable<LockType> recordLockType
)
IFilteredRecordCollection<TRecord^>^ Where(
Func<TRecord^,bool>^ predicate,
Nullable<LockType> recordLockType
)
Parameters
- predicate
- A function to test each record for a condition.
- recordLockType
- The TRecord record lock type for the scope of evaluating the predicate on each record. If a null reference (Nothing in Visual Basic) is provided, then no lock is applied to the record.
Return Value
The filtered collection.
If filtering by a matching key field value, use IRecordCollection<TRecord>.WithFilter<TFieldType> or its various extension methods instead for better performance.