0

Added these packages

<ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0"/>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.0.0"/>
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0"/>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0"/>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.0.0"/>
</ItemGroup>

and I am trying to run this command

Scaffold-DbContext "Server=xxxx;Database=xxx;User Id=sa;Password=xx;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Context

just like .net core 2.0, but I get that:

enter image description here

GSerg
  • 76,472
  • 17
  • 159
  • 346

1 Answers1

0

Reverse engineering the database using Scaffold-DbContext can be performed on the NuGet Package Manager console.

You're not using the Visual Studio NuGet Package Manager console, you're using a PS terminal. Therefore, you should use the command-line tool

dotnet ef dbcontext scaffold "Server=xxxx;Database=xxx;User Id=sa;Password=xx;Trusted_Connection=True;" "Microsoft.EntityFrameworkCore.SqlServer" --output-dir "Models/Scaffold" --context Context
Dennis VW
  • 2,977
  • 1
  • 15
  • 36