Files
mapo-core/MP.Data/Resources/Readme.md
T
2021-05-17 13:33:13 +02:00

23 lines
883 B
Markdown

# Appunti gestione MP-STAT DB
Per la gestione dell'accesso al DB statistiche si opera con EFCore --> apop blazor server
## Scaffolding 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
## Approfondimenti
Qualche link di approfondimento:
- https://docs.microsoft.com/en-us/ef/core/
- https://docs.microsoft.com/en-us/ef/core/extensions/
- https://www.entityframeworktutorial.net/efcore/create-model-for-existing-database-in-ef-core.aspx
- https://entityframework.net/ef-code-first