EntityTypeBuilder does not contain a definition for ToTable in EF Core
For net core 3.1, need to install these packages:
Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.Relational
I had this problem, but did not need to install:
Microsoft.EntityFrameworkCore.Relational
I simply exited VS 2017 and re-opened my solution. I had the following NuGet packages installed:
Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.Tools
And the following CLI Tool Reference:
Microsoft.EntityFrameworkCore.Tools.DotNet
You should add the nuget package Microsoft.EntityFrameworkCore.SqlServer
, since this is a Microsoft SQL method.
Installing Microsoft.EntityFrameworkCore.Relational
is the correct solution, as Ivan says.