NuGet 管理控制台执行下列命令,输出DB first code Scaffold-DbContext "server=your database server;database=your database name;integrated security=SSPI;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models Scaffold-DbContext "server=your database server;database=your database name;integrated security=SSPI;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Force