Scaffold-DbContext with -ContextDir flag doesn't add namespace for models #17839
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
good first issue
This issue should be relatively straightforward to fix.
type-bug
Milestone
The database context generated by
Scaffold-DbContext
doesn't include anyusing
directives pointing to the models that are generated when the DbContext is placed in a different folder using the-ContextDir
flag.Steps to reproduce
Reverse engineer a database using the following command-line options:
Attempt to build.
Note that the build fails because the the entity model classes can't be resolved in ContotoPetsContext.db.
Further technical details
EF Core version: 3.0 preview 9
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: NET Core 3.0
Operating system: Windows 1903
IDE: Visual Studio 2019 16.3.3
I'm MSFT-internal. Hit me up on Teams if you need repro help.
cc: @divega
The text was updated successfully, but these errors were encountered: