update readme
This commit is contained in:
@@ -3,15 +3,18 @@
|
||||
|
||||
Per la gestione dell'accesso al DB statistiche si opera con EFCore --> apop blazor server
|
||||
|
||||
## Scaffolding DB iniziale
|
||||
## Scaffolding
|
||||
|
||||
Per generare le classi da un DB esistente con cui operare EFCore CodeFirst usare lo scaffolding coi seguenti comandi.
|
||||
Attenzione: la classe DbCOntext viene creata INSIEME alle viste nella folder DatabaseModel (nell'esempio seguente...)
|
||||
|
||||
### DB iniziale
|
||||
|
||||
Scaffold-DbContext "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DatabaseModels
|
||||
|
||||
## Scaffolding SOLO di tabelle/viste selezionate (con force update)
|
||||
|
||||
Scaffold-DbContext "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DatabaseModels -Tables v_RS, v_TC_Stat, v_TCR, v_TCR_Day, v_UL
|
||||
|
||||
### SOLO di tabelle/viste selezionate (con force update)
|
||||
|
||||
Scaffold-DbContext "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DatabaseModels -Tables v_RS, v_TC_Stat, v_TCR, v_TCR_Day, v_UL
|
||||
|
||||
## Approfondimenti
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user