-
-
Notifications
You must be signed in to change notification settings - Fork 22
LINQ AsyncPredicateExtensions
ZZZ Projects edited this page Jan 24, 2016
·
3 revisions
Async Predicate extension methods allow to perform operation using an async predicate on LINQ to objects asynchronously.
Support:
- OrderByPredicateCompletion
- StartPredicateConcurrently
// Using Z.Linq
public Task<IEnumerable<Customer>> MyAsyncTaskMethod(CancellationToken cancellationToken)
{
List<Customer> customers = DB.GetCustomers();
// GET all customers by predicate completion
var task = list.WhereAsync(c => MyAsyncPredicate(DB.IsCustomerActiveAsync(c)))
.OrderByPredicateCompletion();
// ... synchronous code ...
return task;
}
Default value to use can be modified in the LinqAsyncManager
LinqAsyncManager.DefautlValue.OrderByPredicateCompletion = true; // default false;
LinqAsyncManager.DefaultValue.StartPredicateConcurrently = false; // default false;
Entity Framework
Bulk Operations
Expression Evaluator
Others
Need more info? [email protected]
Contact our outstanding customer support for any request. We usually answer within the next business day, hour, or minutes!