I'm trying to use Scaffolding in EFCore against a mysql database where the generated code will be run on Linux CentOS (NetCoreApp framework). I'm developing on Windows with VS2015 Update3.
Tables are successfully reverse engineered, but stored procedures are not included. Without stored procedures, I'm afraid we'll have to ditch EFCore.
- Does scaffolding in EFCore against mysql support reverse engineering stored procedures?
- Using any combination of drivers?
- Assuming this functionality turns out to be absent from EFCore currently, do you know of any solution, paid or unpaid, to accomplish this - reverse engineer existing mysql database to be used in netcoreapp on CentOS?
As a sample case, I started with a mysql database with a single table and a parameterless stored proc. I think I'm using the latest EFCore and Pomelo drivers as shown in project.json below...
{
"version": "1.1.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"tools": {
"Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final"
},
"dependencies": {
"Microsoft.EntityFrameworkCore.Design": "1.1.0",
"Pomelo.EntityFrameworkCore.MySql": "1.1.1-prerelease-10011",
"Pomelo.Data.MySql": "1.0.0",
"Pomelo.EntityFrameworkCore.MySql.Design": "1.1.1-prerelease-10011",
"Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final"
},
"frameworks": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0-*"
}
}
}
}
}
And after doing the dotnet restore use the following to invoke scaffolding...
Scaffold-DbContext "server=localhost;user id=root;password=;database=simpledb" Pomelo.EntityFrameworkCore.MySql -OutputDir Models -force
After running the scaffolding, in both my real case and in the simple test case, the generated code only contains tables, and does not contain stored procedures.