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

Fix to #18211 - Throw better exception for Last without order by #19773

Merged
merged 1 commit into from
Feb 6, 2020

Conversation

Muppets
Copy link
Contributor

@Muppets Muppets commented Feb 2, 2020

Summary of the changes

  • Added throw to TranslateLastOrDefault to give a friendly exception

Not great at exception message text at the best of times. I went with:

When performing a Last() operation, you must include an OrderBy clause.

I'm open to suggestions on better text!

Fixes #18211

@ajcvickers
Copy link
Member

@maumar Can you take a look at this PR? Looks decent to me, but it is query. ;-)

@maumar
Copy link
Contributor

maumar commented Feb 4, 2020

some minor changes, looks good otherwise!

@Muppets Muppets requested a review from dougbu as a code owner February 6, 2020 20:34
@Muppets
Copy link
Contributor Author

Muppets commented Feb 6, 2020

Squashed and good to go!

@smitpatel smitpatel merged commit 9e716d6 into dotnet:master Feb 6, 2020
@smitpatel
Copy link
Member

@Muppets - Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Throw better exception for Last without order by
4 participants