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

Add DateOnly.FromDateTime query mapping for SQL Server #31180

Merged
merged 5 commits into from
Jul 4, 2023

Conversation

ErikEJ
Copy link
Contributor

@ErikEJ ErikEJ commented Jul 3, 2023

fixes #30708

@ErikEJ ErikEJ changed the title Add DateOnly.FormDateTime query mapping for SQL Server Add DateOnly.FromDateTime query mapping for SQL Server Jul 3, 2023
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ErikEJ, looks good thanks.

FYI test test doesn't require a DateOnly in the model, only a DateTime, so it could simply be added to e.g. NorthwindFunctions to avoid adding DateTime to GearsOfWar and changing all the baselines.

Note that it should be pretty easy to implement this for SQLite as well, with the date() function (docs) - are you interested in doing that?

…SqlServerTest.cs

Co-authored-by: Shay Rojansky <roji@roji.org>
@ErikEJ
Copy link
Contributor Author

ErikEJ commented Jul 4, 2023

@roji Should I move the test?

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Jul 4, 2023

I will leave the SQLite implementation to someone else 😄

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Jul 4, 2023

I am moving the test

@roji
Copy link
Member

roji commented Jul 4, 2023

@ErikEJ pushed a commit that implements for SQLite and asserts failure for Cosmos.

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Jul 4, 2023

Cool, thanks

@roji roji merged commit 99d0c74 into dotnet:main Jul 4, 2023
@roji
Copy link
Member

roji commented Jul 4, 2023

Thanks as always @ErikEJ!

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Jul 6, 2023

@roji Tag "community-contribution"?

@roji
Copy link
Member

roji commented Jul 6, 2023

Added

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

Successfully merging this pull request may close these issues.

Translate DateOnly.FromDateTime
2 participants