Skip to content

Add a compiled slim model generator#24612

Merged
AndriySvyryd merged 2 commits intomainfrom
Issue1906
May 18, 2021
Merged

Add a compiled slim model generator#24612
AndriySvyryd merged 2 commits intomainfrom
Issue1906

Conversation

@AndriySvyryd
Copy link
Copy Markdown
Member

@AndriySvyryd AndriySvyryd commented Apr 7, 2021

Part of #1906

The indexer properties now require a setter
The DbFunction names are now more readable if generic types are involved
Add designTime parameter to IRelationalAnnotationProvider
Remove more design-time metadata from runtime model
Fix some configuration loss when reattaching entity types
Add missing SqlServer Metadata methods

Comment thread src/EFCore.Design/Design/Internal/CSharpHelper.cs
Comment thread src/EFCore.Relational/Metadata/SlimDbFunctionParameter.cs Outdated
Comment thread src/EFCore/Design/CSharpSlimAnnotationCodeGenerator.cs
Comment thread src/EFCore/Metadata/IReadOnlyEntityType.cs Outdated
@AndriySvyryd AndriySvyryd changed the base branch from DesignTimeServices to main April 15, 2021 19:21
@AndriySvyryd AndriySvyryd marked this pull request as ready for review May 4, 2021 16:57
@AndriySvyryd
Copy link
Copy Markdown
Member Author

@dotnet/efteam This is now ready for a full review

@AndriySvyryd
Copy link
Copy Markdown
Member Author

Ping. We branch for preview5 tomorrow.

Comment thread src/EFCore.InMemory/Design/Internal/InMemoryCSharpSlimAnnotationCodeGenerator.cs Outdated
Comment thread src/EFCore.Relational/Extensions/RelationalModelExtensions.cs
Remove more design-time metadata from runtime model
Fix some configuration loss when reattaching entity types
Add missing SqlServer Metadata methods
Add more tests
@smitpatel
Copy link
Copy Markdown
Contributor

How much breaking changes rule applies to generated code here? Can we change the generated code in future release in breaking way (i.e. code generated earlier wouldn't compile without regenerating). This differs bit from migrations where old migrations need to continue working.

@AndriySvyryd
Copy link
Copy Markdown
Member Author

AndriySvyryd commented May 18, 2021

@smitpatel The compiled models need to be regenerated on every major or minor version upgrade. #24906 adds a warning for this.

@AndriySvyryd
Copy link
Copy Markdown
Member Author

However users might have code in partial classes using the same API, so the general breaking changes policy applies to it.

@AndriySvyryd AndriySvyryd merged commit a60795c into main May 18, 2021
@AndriySvyryd AndriySvyryd deleted the Issue1906 branch May 18, 2021 04:32
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.

2 participants