Having a prefix for generated Types in reverse engineering scaffold command
See original GitHub issueWhat problem are you trying to solve?
I use ef core scaffolder to generate models from various databases. Some models may have the same names but they’re from different bounded contexts. For example, type Order
has the same name in two databases but serves different purposes.
Describe the solution you’d like
I want to be able to add a prefix to type names when I generate models from each database. Something like:
dotnet ef dbcontext scaffold "<my connection string>" Microsoft.EntityframeworkCore.SqlServer -o SalesModels --type-prefix Sales
This should generate a type named SalesOrder
for the table Orders
in the Sales
database.
I also would like to contribute to this feature. Thank you
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top 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 Customize Scaffolding
The advice is that once you have reverse-engineered your model from the existing database, you use migrations to keep the two in sync...
Read more >Generating a model from an existing database
In this approach, you reverse-engineer a model from an existing database, ... You use the DbContext Scaffold command to generate the model.
Read more >Using EF Core Code First with Existing Databases - YouTube
In this tutorial I'll teach you the reverse engineering method using EF Core Code First with the well-known Northwind database.
Read more >EntityFrameworkRuler 1.2.22
CLI tool for creating and applying entity model rules used to align the Reverse Engineering output with a custom design such as that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
EF Core Power Tools allows you to do renaming, including based on a reg ex.
Note from triage: agreed that this is covered by #4038.