update readme

This commit is contained in:
Samuele Locatelli
2021-05-17 16:52:09 +02:00
parent c6486d3456
commit c23d4d9449
2 changed files with 8 additions and 5 deletions
+8 -5
View File
@@ -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.