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

Generate the compiled model during build #24894

Closed
Tracked by #22952
AndriySvyryd opened this issue May 13, 2021 · 2 comments · Fixed by #33049
Closed
Tracked by #22952

Generate the compiled model during build #24894

AndriySvyryd opened this issue May 13, 2021 · 2 comments · Fixed by #33049
Labels
area-model-building closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@AndriySvyryd
Copy link
Member

AndriySvyryd commented May 13, 2021

This allows to make sure that the context is using an up-to-date model, most useful for Release builds.
To avoid dependency cycles the compiled model needs to be compiled in an assembly separate from the startup assembly

@danroot
Copy link

danroot commented Feb 15, 2023

I second this. I'm seeing great improvements in startup times for a project with a large model, but I keep forgetting to run ef optimize and am worried other devs on the project will as well. I'd envision this task would look at the files associated with the DBContext, then the ones associated with the model. If any associated with the DbContext are newer than the ones associated with the model, run dotnet ef optimize.

@stevefan1999-personal
Copy link

We need this for EF Core to run in Native AOT mode. We will need some way to automatically build compiled model and transparently shim in for Native AOT DX.

AndriySvyryd added a commit that referenced this issue Feb 8, 2024
Refactor OperationExecutor to use IOperationReportHandler instead of Reporter directly

Part of #24894
AndriySvyryd added a commit that referenced this issue Feb 8, 2024
Refactor OperationExecutor to use IOperationReportHandler instead of Reporter directly

Part of #24894
roji pushed a commit to roji/efcore that referenced this issue Feb 9, 2024
Refactor OperationExecutor to use IOperationReportHandler instead of Reporter directly

Part of dotnet#24894
AndriySvyryd added a commit that referenced this issue Feb 10, 2024
AndriySvyryd added a commit that referenced this issue Feb 22, 2024
AndriySvyryd added a commit that referenced this issue Feb 22, 2024
AndriySvyryd added a commit that referenced this issue Feb 29, 2024
AndriySvyryd added a commit that referenced this issue Feb 29, 2024
@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Mar 15, 2024
@AndriySvyryd AndriySvyryd removed their assignment Mar 15, 2024
@ajcvickers ajcvickers modified the milestones: Backlog, 9.0.0-preview3 Mar 26, 2024
@roji roji modified the milestones: 9.0.0-preview3, 9.0.0 Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-model-building closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants