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

Breaking change note for DateOnly/TimeOnly scaffolding #4237

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

roji
Copy link
Member

@roji roji commented Jan 30, 2023

Closes #4233

@roji roji requested a review from a team January 30, 2023 10:06
@roji roji force-pushed the DateTimeOnlyBreakingChange branch from 80f748c to f87cdce Compare January 30, 2023 10:07

This change only affects users which regularly re-scaffold their database into an EF code model ("database-first" flow).

It is recommended to react to this change by modifying your code to use the newly scaffolded `DateOnly` and `TimeOnly` types. However, if that isn't possible, you can edit the scaffolding templates to revert to the previous mapping. To do this, set up the templates as described on [this page](xref:core/managing-schemas/scaffolding/templates). Then, edit the `EntityType.t4` file, find where the entity properties get generated (search for `property.ClrType`), and change the code to the following:
Copy link
Member

Choose a reason for hiding this comment

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

I think we'll want to update this once we have the design-time service in place.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I was under the impression we'd do that only if we get sufficient feedback.

In any case, this is already written, we can always update later.

@roji roji force-pushed the DateTimeOnlyBreakingChange branch from f87cdce to 412dde8 Compare January 30, 2023 10:28
@roji roji merged commit 17c9cbb into dotnet:main Jan 30, 2023
@roji roji deleted the DateTimeOnlyBreakingChange branch January 30, 2023 10:33
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.

Document scaffolding to DateOnly and TimeOnly as a breaking change
2 participants