You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Queryable
Objects which are IQueryable<T> may only be filtered by specification expressions.
Collections
Objects which are IEnumerable<T> may be filtered by either specification expressions or functions.