question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incremental scaffold existing database

See original GitHub issue

What problem are you trying to solve?

When I want to scaffold new table to existing Db Context, the EF Core CLI regenerates all classes which dismiss any changes I might have done.

When I explicitly tell to scaffold only particular Tables, relationships to exiting entities are ignored.

Describe the solution you’d like

I would like to perform incremental update of my model. It would load existing model model configuration, add new entities and configuration classes without regenerating entire model.

e.g.: dotnet ef dbcontext scaffold "Server=localhost;Database=Blogging" Microsoft.EntityFrameworkCore.SqlServer --table NewTable --incremental

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ErikEJcommented, Jun 12, 2021

I think you have chosen that path of manual changes in that case.

1reaction
rojicommented, Jun 10, 2021

@Liero you probably want to take a look at @ErikEJ’s EF Core Power Tools, which should help you with that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scaffolding (Reverse Engineering) - EF Core
Reverse engineering is the process of scaffolding entity type classes and a DbContext class based on a database schema.
Read more >
Entity Framework Core scaffold additional tables not context
The scaffold utility was meant to take an existing database and create all the necessary code first models/contexts for you as a starting...
Read more >
.Net core 6 and EF Core Scafflod with Existed SQL ...
Scaffolding is particularly useful when you want to start building an application that interacts with an existing database.
Read more >
Reverse Engineering from an existing database. Is it ...
Reverse Engineering from an existing database. Is it possible to run dotnet ef dbcontext scaffold without creating inverse navigation properties ...
Read more >
Scaffolding Guide
Scaffolding is a technology to create the model and the database context (DbContext) based on the existing database schema, and then generate the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found