3

I see that there are to way how to scaffold entities and db context in Entity Framework Core 2.0.

  1. using Scaffold-DbContext
  2. using dotnet ef dbcontext scaffold

Why there are two tools and what is the difference?

Liero
  • 25,216
  • 29
  • 151
  • 297

1 Answers1

6

Scaffold-DbContext runs in Visual Studio's NuGet Package Manager Console (PMC) and has better VS integration--opens files and infers the startup project.

dotnet ef dbcontext scaffold is a general command-line interface that can run outside of Visual Studio (and Windows).

Otherwise, they execute the exact same logic.

bricelam
  • 28,825
  • 9
  • 92
  • 117