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

Break apart methods in the compiled model #31370

Open
culushishui opened this issue Jul 28, 2023 · 6 comments
Open

Break apart methods in the compiled model #31370

culushishui opened this issue Jul 28, 2023 · 6 comments

Comments

@culushishui
Copy link

Database have about 1350 tables and 35650 fields.
I uploaded compiled models library(EFCoreCompiledModels.zip),can reference it and compile,will show CS0240 error
EFCoreCompiledModels.zip

EF Core version:
Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Target framework: (e.g. .8.0.0-preview.6.23329.4)
Operating system:
IDE: (e.g. Visual Studio 2022 17.4)

@ajcvickers
Copy link
Member

Note for triage: EFCoreStudyContextCompliedModel is 521,614 lines long.

@culushishui
Copy link
Author

culushishui commented Aug 5, 2023

Think you reply. Triage is some tables in one dbcontext and other some tables in another dbconext ?

@almostchristian
Copy link

In EF Core 7, my compiled model file was 13,880 lines long, and turned into 453,786 after updating to EF Core 8. The new CreateRelationalModel function, which is over 430,000 lines long, seems to be the culprit, since the Initialize function seems to be similar to the one in EF Core 7.

@AndriySvyryd
Copy link
Member

As a workaround you can remove the CreateRelationalModel method. EF will then fallback to 7.0 behavior and create it at runtime.

@ajcvickers
Copy link
Member

@AndriySvyryd We should doc this workaround in the breaking changes.

@ajcvickers ajcvickers removed this from the Backlog milestone Jan 3, 2024
@ajcvickers
Copy link
Member

Doced in dotnet/EntityFramework.Docs#4593

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

No branches or pull requests

4 participants