This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
nebolcontroller_netcore_mssql_adjustments [2021/07/31 16:26] – nebol | nebolcontroller_netcore_mssql_adjustments [2021/08/02 03:07] (current) – nebol | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== WORK IN PROGRESS ==== | ||
DAL project: | DAL project: | ||
+ | < | ||
Install-Package Microsoft.EntityFrameworkCore.Design | Install-Package Microsoft.EntityFrameworkCore.Design | ||
Install-Package Microsoft.EntityFrameworkCore.SqlServer # if needed for any MSSQL stuff in your DbContext | Install-Package Microsoft.EntityFrameworkCore.SqlServer # if needed for any MSSQL stuff in your DbContext | ||
+ | </ | ||
Add Models | Add Models | ||
- | |||
Add a DbContext | Add a DbContext | ||
Line 69: | Line 71: | ||
- | === Create a first migration === | + | === Create a migration === |
+ | < | ||
dotnet ef migrations add InitialCreate --project MyProject.DAL | dotnet ef migrations add InitialCreate --project MyProject.DAL | ||
+ | </ | ||
+ | |||
+ | === Update the database === | ||
+ | < | ||
+ | dotnet ef database update --project Mixer.DAL | ||
+ | </ | ||
Main project: | Main project: |