-
Notifications
You must be signed in to change notification settings - Fork 387
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
EF Core 3 With Pomelo MySQL Provider Does Not Scaffold Views #867
Comments
Just tried Pomelo provider version 3.0.0-rc1.final to scaffold my simple MySQL 8.0.17 database with 9 tables using .NET Core 3.0, VS2019 16.3.3 and it worked without any issues. I used the same Scaffold-DbContext command from the above comment. However, I have no views in my DB. |
seem like my project is using mysql.data client even if i dont have reference to it anymore
|
My test project: |
No, you are using the underlying MySqlConnector library. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Pomelo is using the information_schema to get the tables info, in this way, only real existed tables could be scaffolded, so the view is not working currently. And when I implement the scaffolding for Pomelo, the no key tables were not supported. Pomelo is a third party provider, it means some features are not aligned to the announcement which published by Microsoft. But we are going to align the features soon. |
I dont have any view, I only have tables |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@hakankurcenlivivense Pomelo does support views in general. It seems though, that this has not yet been implemented for scaffolding an existing database, as the following SQL is used to query the tables only but not the views: Pomelo.EntityFrameworkCore.MySql/src/EFCore.MySql/Scaffolding/Internal/MySqlDatabaseModelFactory.cs Line 81 in 49cac2e
I will implement this for |
I am sory I thought I reply to #866 |
Scaffolding views from existing databases has been added now with #896. |
According to the following link, EF Core 3 supports reverse engineering views:
https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-3.0/
And according to these links, there isn't yet a MySQL provider for EF Core 3:
dotnet/efcore#17556
https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework-core.html
So, I used the Pomelo provider version 3.0.0-rc1.final to scaffold:
But scaffolding did not create the views. Are you also experiencing this issue or is this something related to my configuration?
The text was updated successfully, but these errors were encountered: