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

Max<Valuetype?>/Min<ValueType?> throw when no rows #16542

Closed
John0King opened this issue Jul 10, 2019 · 1 comment · Fixed by #16974
Closed

Max<Valuetype?>/Min<ValueType?> throw when no rows #16542

John0King opened this issue Jul 10, 2019 · 1 comment · Fixed by #16974
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-bug
Milestone

Comments

@John0King
Copy link

using .net core Preview6 and EF Core 3.0.0-preview6.19304.10

var maxOrder = _db.Fields.Max(f=>(int?)f.Order);

This line of code throw sequence contains no element

@smitpatel
Copy link
Member

Throw on min/max should depend on type being nullable or not. Also check Avg/Sum.

@ajcvickers ajcvickers added this to the 3.0.0 milestone Jul 12, 2019
@ajcvickers ajcvickers self-assigned this Jul 12, 2019
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Aug 6, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview9 Aug 21, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0-preview9, 3.0.0 Nov 11, 2019
@ajcvickers ajcvickers removed their assignment Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants