Skip to content
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

Feature Request - Optional Don't generate constructors for dbContext #995

Closed
CodeTile opened this issue May 26, 2021 · 3 comments
Closed

Comments

@CodeTile
Copy link

When I reverse engineer a database, the tool generates the constructors for database Context.
Would it be possible to have an option to not generate the constructors?
In my code I have setup a partial class with constructors and the connection string. The tool gives an option to not generate the connection string but there is none for not generating constructors.

@ErikEJ
Copy link
Owner

ErikEJ commented May 26, 2021

Why are you unable to use the constructor that takes DbContextOptions?

@CodeTile
Copy link
Author

I can't remember exactly why, but having just tested again with the autogenerated constructors, it works.
I think it might of been an issue with DI for IConfiguration. I was using Microsoft.DependancyInjection, but have switched to AutoFac recently.

@ErikEJ
Copy link
Owner

ErikEJ commented Jul 11, 2021

Fixed in latest daily build: b85c77d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants