It seems that the "official" provider MySql.Data.EntityFrameworkCore 7.0.7-m61
still does not support forests. However, it works great with the Pomelo.EntityFrameworkCore.MySql
free community provider :
dotnet ef dbcontext scaffold "Host=localhost;Port=3306;Database=foodb;Username=root;Password=mysql" ^ Pomelo.EntityFrameworkCore.MySql ^ --force ^ --context "FooContext" ^ --output-dir "Entities" ^ --verbose
Our csproj (Visual Studio 2017):
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp1.1</TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="1.1.2-preview-10036" /> <PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2-preview-10036" /> <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" /> </ItemGroup> </Project>
source share