-
-
Notifications
You must be signed in to change notification settings - Fork 22
LINQ AsyncExtensions
ZZZ Projects edited this page Jan 24, 2016
·
2 revisions
Async Extension methods to perform operation on LINQ to objects asynchronously.
// Using Z.Linq
public Task<IEnumerable<Customer>> MyAsyncMethod(CancellationToken cancellationToken)
{
List<Customer> customers = DB.GetCustomers();
var task = list.WhereAsync(c => c.IsActive, cancellationToken);
// ... synchronous code ...
return task;
}
If a cancellationToken is used, "ThrowIfCancellationRequested()" is invoked in the Enumerator.MoveNext() method.
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!