Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Average does not support nullable types #700

Closed
daviscollins opened this issue Apr 20, 2023 · 1 comment
Closed

Dynamic Average does not support nullable types #700

daviscollins opened this issue Apr 20, 2023 · 1 comment
Assignees
Labels

Comments

@daviscollins
Copy link

1. Description

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

3. Fiddle or Project

https://dotnetfiddle.net/kgbraA

4. Any further technical details

Filtering out the null values and casting to Int32 or Double seems to work as an alternative (see Fiddle above).

@daviscollins daviscollins changed the title Dynamic Average method behaves differently than standard LINQ Average Dynamic Average does not support nullable types Apr 20, 2023
@StefH StefH self-assigned this May 15, 2023
@StefH StefH added the bug label May 15, 2023
@StefH
Copy link
Collaborator

StefH commented May 20, 2023

This is fixed and will be included in next version.

@StefH StefH closed this as completed May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants