-
Notifications
You must be signed in to change notification settings - Fork 0
Filtering
Craig Fowler edited this page Mar 5, 2020
·
1 revision
Specifications may be used as parameters when filtering collection or queryable objects, just like with Linq.
The following Linq functions all accept specification objects as parameters, instead of writing the predicate manually. This is achieved via extension methods in the CSF.Specifications
namespace.
Where
First
FirstOrDefault
Single
SingleOrDefault
Count
Any
Objects which are IQueryable<T>
may only be filtered by specification expressions.
Objects which are IEnumerable<T>
may be filtered by either specification expressions or functions.