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
It appears that System.Linq.Dynamic.Core.DynamicQueryableExtensions.Average() differs from System.Linq.Enumerable.Average() in that it does not support averaging values of nullable type Int32?.
Is this expected behavior or a bug?
2. Exception
Exception message: Specific method not found: Average
Filtering out the null values and casting to Int32 or Double seems to work as an alternative (see Fiddle above).
The text was updated successfully, but these errors were encountered:
daviscollins
changed the title
Dynamic Average method behaves differently than standard LINQ Average
Dynamic Average does not support nullable types
Apr 20, 2023
1. Description
It appears that
System.Linq.Dynamic.Core.DynamicQueryableExtensions.Average()
differs fromSystem.Linq.Enumerable.Average()
in that it does not support averaging values of nullable typeInt32?
.Is this expected behavior or a bug?
2. Exception
3. Fiddle or Project
https://dotnetfiddle.net/kgbraA
4. Any further technical details
Filtering out the null values and casting to
Int32
orDouble
seems to work as an alternative (see Fiddle above).The text was updated successfully, but these errors were encountered: