-
-
Notifications
You must be signed in to change notification settings - Fork 22
LINQ AsyncTaskExtensions
ZZZ Projects edited this page Jan 24, 2016
·
2 revisions
Async Task extension methods allow to perform operation on Task<IEnumerable<T>>.
// Using Z.Linq
public async Task<List<Customer>> MyAsyncTaskMethod(CancellationToken cancellationToken)
{
// GET the five first customers which the predicate has completed
var task = list.WhereAsync(c => MyAsyncPredicate(DB.IsCustomerActiveAsync(c)))
.OrderByPredicateCompletion()
.Take(5)
.ToList();
// ... synchronous code ...
return task;
}
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!