-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
New Option "No parameterless constructor" #1040
Comments
Duplicate of #991 which is fixed in EF Core 6 - but a PR to fix this would be most welcome, given the increasing number of users hitting this. |
A sample PR for adding anew option: https://github.com/ErikEJ/EFCorePowerTools/pull/728/files |
Fixed in latest daily buidl: b85c77d |
@0xced FYI! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I create the DBContext from an existing database (I always do this after a change) then a StandardConstructor is created with parameters and without parameters. Whereas the one without parameter is not used. (Reverse Engineer)
But when using AddDbContextPool ( ms docs ) there must be only one constructor (with or without parameter).
It would be great if there was an option to not automatically generate the parameterless constructor. The error occurs unfortunately only at runtime
Steps to reproduce
Use AddDbContextPool instead of AddDbContext
Visual Studio version: Visual Studio 2019 16.9 (latest)
The text was updated successfully, but these errors were encountered: