Improvements to reverse engineering (a.k.a. scaffolding a DbContext) for Database First flows
This an "epic" issue for the theme of miscellaneous improvements to reverse engineering (scaffolding) a context from an existing databases/. Specific pieces of work will be tracked by linked issues.
Done in 6.0
- [x] Detect simple join tables in reverse engineering and create many-to-many relationships #2247
- [x] Preserve DeleteBehavior when scaffolding a database created by EF Core #21252
- [x] Can Scaffold-DbContext generate entities with comments #19113
- [x] Scaffolding and C# 8 nullable reference types #15520
- [x] Handle duplicate foreign keys #25197
Proposed for 7.0
- [x] dotnet ef dbcontext scaffold doesn't work with computed columns unless user is db_owner #22842
- [ ] Reverse Engineer: Extensibility points to customize model, code templates, etc #4038
- [ ] Scaffold-DbContext template not compatible with DbContext pooling (AddDbContextPool) #12604
- [ ] Stop scaffolding DbSet initialization to null! #26877
Backlog
- [ ] Reverse Engineer: Better support for namespaces #3988
- [ ] Generate custom namespaces for literals in scaffolding #25493
- [ ] Allow CoreTypeMapping.GenerateCodeLiteral to influence using directives #13799
- [ ] Consider a scaffolding mode that generates data-binding entity types #15515
- [ ] Add option to skip views to Scaffold-dbcontext #21283
- [ ] Update model from database #831
- [ ] Support scaffolding models and context to separate projects #7847
- [ ] RevEng: Option to ignore DEFAULT constraints #10881
- [ ] Consider allowing reverse engineering to generate CLR property defaults based on column defaults #9632
- [ ] Reverse engineering: Have a way to discover installed providers so you don't always need to specify them in commands #13940
- [ ] Feature Request: EF tools and SSDT integration #1186
- [ ] Reverse engineer/scaffold stored procedures #15105
- [ ] RevEng: Check constraint #15408
- [ ] Scaffold views into SQL definitions on the model #20940
- [ ] DatabaseGeneratedAttribute in scaffolded code #22170
- [ ] Consider using Verbatim String Generation if absolutely sure will not contain linebreaks #20723
- [ ] RevEng: Generate IEntityTypeConfiguration classes (avoids large OnModelCreating) #8434
- [ ] RevEng: Generate Validation attribute always #9580
- [ ] Recognize filters created by fluent API and reverse engineer to fluent API. #10183
- [ ] Scaffold-DbContext generates incorrect nav property on foreign key with filtered unique index #11298
- [ ] Reverse Engineer: Table/Schema Exclusion #6182
- [ ] RevEng: Option to omit artifacts unused by the runtime #10890
- [ ] Allow omitting value generation via convention when scaffolding #11005
- [ ] RevEng: Avoid redundant code in many to many #25547
- [ ] Optionally bring back join tables on scaffold db #26820
- [ ] Names and default names for keys, constraints and indices #12837
- [ ] Further improvements to design-time method call generation #25498
- [ ] Revisit navigation naming convention when reverse-engineering composite keys #16711
- [ ] Use alternate key when no primary key #19918
- [ ] SQLite RevEng: Reverse engineer index filters #8800
- [ ] Sqlite RevEng: Scaffold CHECK constraints #23142
- [ ] SQLite RevEng: Reverse engineer constraint names #8802
- [ ] SQLite RevEng: Sample data to determine CLR type #8824
- [ ] Sqlite Spatial RevEng: Column SRID and Dimension not configured #13765
- [ ] Sqlite Spatial RevEng: Ignore empty string column default #13766
- [ ] SQL Server RevEng: Configure SqlServerDbContextOptionsBuilder #10487
- [ ] Reverse engineering rowversion/timestamp on SQL Server should generate ulong property #12435
- [ ] SqlServer RevEng: Scaffold default schema #9318
- [ ] SqlServer RevEng: Scaffold Included index columns #22150
- [ ] Scaffolding of synonyms in SqlServer #23395
- [ ] RevEng: allow to reverse-engineer indexes on period columns #26008
- [ ] RevEng: Decimal column with same precision and scale as the default produce warnings at runtime #12241
- [ ] RevEng: Use EF to load metadata for SqlServer provider #1667
#10881 ?
I will be very happy with this one -> Revisit navigation naming convention when reverse-engineering composite keys #16711
I will be happy with this one -> SP's being scaffolded even if it requires them being done at the template level.
However if I was to implement it myself, how could the parameters, it's name, etc be known by the template system, or even it's implementation?
I guess this is something that merits a source dive into ef6 to find out.