Scaffold-dbcontext command
Parameters
Scaffold-dbcontext [-connection] <String> [-provider] <String>[-outputdirectory <String> ] [-contextclassname <String>] [-tables <string>] [-dataannotations] [-project <String> ][<commonparameters;]
Example (note that the backslash is a)
" Server=.\testdb;database=testdbname; trusted_connection=true; multipleactiveresultsets=true; " Microsoft.entityframeworkcore.sqlserver-outputdir DataModel1
" Server=.\testdb ;D Atabase=testdbname; User Id=sa; Password=sa; " Microsoft.entityframeworkcore.sqlserver-outputdir DataModel2
effect (reproduced from resources)
references
Start using EF core from an existing database on ASP.
Https://docs.microsoft.com/zh-cn/ef/core/get-started/aspnetcore/existing-db
. NET Core Entity Framework Core How do you create DbContext
Http://www.cnblogs.com/tdws/p/5874212.html
. NET core uses EF core
Http://www.cnblogs.com/ziye/p/7562889.html
[. NET core]-Create DbContext using EF Core's scaffold-dbcontext Scaffolding command