-
Notifications
You must be signed in to change notification settings - Fork 9
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
"dotnet ef dbcontext scaffold" command: Which provider name? #14
Comments
I don't believe reverse engineering a DB is supported by this library at this time. Giving the assembly name of SapientGuardian.EntityFrameworkCore.MySql resulted in
And sure enough, we don't have DesignTimeProviderServicesAttribute anywhere in the source tree that I could find. You might try your luck with the recently-released official mysql ef core library, https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore/ |
Unfortunately, it is not working with the official packages yet (same error)... |
After much of the exact same grief with the DesignTimeProviderServicesAttribute error on scaffolding, I was able to reverse engineer a MySQL database using a different provider: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql I ran across this provider on the microsoft docs site https://docs.microsoft.com/en-us/ef/core/providers/pomelo/. Good luck! |
@lindeberg Assuming you have both Pomelo.EntityFrameworkCore.MySql and Pomelo.EntityFrameworkCore.MySql.Design installed, have you tried restarting VS? I think you should be pretty much good to go with what you have there. Your command looks about the same as mine: Scaffold-DbContext "server=server;userid=user;pwd=pass;port=3306;database=db;sslmode=none;" Pomelo.EntityFrameworkCore.MySql -o Models/subfolder |
@rbudnar Sorry, and thank you, didn't have .Design, been a long day. By the way, it's been a while since you used this - do you think it's production ready? |
@lindeberg I've been using it for a while and haven't run into any real issues with it - of course I'm doing anything huge with it either, but it has been working well for me. Maybe take a look at their issues and see if anything there is a red flag for you? https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues Of course, I don't want to spam up this repo talking about another one, my apologies :) |
I would like to create my DbContext from an existing MySQL database. MS describes this for SQL Server here.
I tried some provider names like MySQL.Data.Entity.MySQLDatabaseProvider, MySQL.Data.Entity, SapientGuardian.EntityFrameworkCore. ..., but none of them worked.
Error "Could not find provider".
Please give me a hint for this issue.
Thank you
The text was updated successfully, but these errors were encountered: