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

Scaffold entity configuration into separate files #27777

Closed
chrisatweave opened this issue Apr 7, 2022 · 2 comments
Closed

Scaffold entity configuration into separate files #27777

chrisatweave opened this issue Apr 7, 2022 · 2 comments

Comments

@chrisatweave
Copy link

Reading through the scaffolding code and the commands configuration (DbContextScaffoldCommand.Configure.cs) I couldn't find a feature that solves this problem.

I am porting a large legacy app to .NET Core, the new .NET Core codebase is a slave to the "legacy" codebase and must re-scaffold often. The legacy codebase is still in very much active development.

When scaffolding from the legacy database, the dbcontext size becomes unmanageable due to the thousands of lines of entity configuration. This causes several issues:

  • Tweaking the configuration to meet the new tech stack becomes unrealistic.
  • The dbcontext can become unresponsive while the static analysis process the file (ie cache is cleared).
  • Git diffs become useless after large migrations from the parent legacy code base (important for .NET Core tweaks)

Being able to specific a directory for entity configurations to be output to as individual files would solve this problem.

@ErikEJ
Copy link
Contributor

ErikEJ commented Apr 7, 2022

EF Core Power Tools contains a (preview) feature to do this.

@ajcvickers
Copy link
Member

Duplicate of #8434.

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
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

3 participants