After install Microsoft.EntityFrameworkCore, Microsoft.EntityFramwworkCore.Sqlserver, Microsoft.EntityFrameworkCore.Tools
From PM console command line
Code First
1) Add-Migration InitialCreate (it will create a migration fold with code)
2) Update-database ( it will create a DB with data table defined)
Code First
1) Add-Migration InitialCreate (it will create a migration fold with code)
2) Update-database ( it will create a DB with data table defined)
From PM console command line drop down list, set Default Project which will accommodate class
DB first:
scaffold-dbcontext "Server=sqldev;Database=Timesheet;Trusted_Connection=True;TrustServerCertificate=true;MultipleActiveResultSets=true;" Microsoft.EntityFrameworkCore.Sqlserver -outputdir Models -force
DB first:
scaffold-dbcontext "Server=sqldev;Database=Timesheet;Trusted_Connection=True;TrustServerCertificate=true;MultipleActiveResultSets=true;" Microsoft.EntityFrameworkCore.Sqlserver -outputdir Models -force
No comments:
Post a Comment