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
* Added SumAsync
* Made SumAsync generic to work with all return types
* Made reflected methods static for better performance
* Added tests
* Added Reflection that works on netstandard1.3
/// Asynchronously computes the sum of a sequence of values.
696
+
/// </summary>
697
+
/// <remarks>
698
+
/// Multiple active operations on the same context instance are not supported. Use 'await' to ensure
699
+
/// that any asynchronous operations have completed before calling another method on this context.
700
+
/// </remarks>
701
+
/// <param name="source">
702
+
/// An <see cref="IQueryable" /> that contains the elements to be summed.
703
+
/// </param>
704
+
/// <param name="selector"> A projection function to apply to each element. </param>
705
+
/// <param name="args">An object array that contains zero or more objects to insert into the predicate as parameters. Similar to the way String.Format formats strings.</param>
706
+
/// <returns>
707
+
/// A task that represents the asynchronous operation.
708
+
/// The task result contains the number of elements in the sequence that satisfy the condition in the predicate
/// Asynchronously computes the sum of a sequence of values.
719
+
/// </summary>
720
+
/// <remarks>
721
+
/// Multiple active operations on the same context instance are not supported. Use 'await' to ensure
722
+
/// that any asynchronous operations have completed before calling another method on this context.
723
+
/// </remarks>
724
+
/// <param name="source">
725
+
/// An <see cref="IQueryable" /> that contains the elements to be summed.
726
+
/// </param>
727
+
/// <param name="selector"> A projection function to apply to each element. </param>
728
+
/// <param name="args">An object array that contains zero or more objects to insert into the predicate as parameters. Similar to the way String.Format formats strings.</param>
729
+
/// <param name="cancellationToken">
730
+
/// A <see cref="CancellationToken" /> to observe while waiting for the task to complete.
731
+
/// </param>
732
+
/// <returns>
733
+
/// A task that represents the asynchronous operation.
734
+
/// The task result contains the sum of the projected values.
// Copied from https://github.com/aspnet/EntityFramework/blob/9186d0b78a3176587eeb0f557c331f635760fe92/src/Microsoft.EntityFrameworkCore/EntityFrameworkQueryableExtensions.cs
0 commit comments