This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:csharp [2024/10/22 18:57] – adam | dev:csharp [2024/12/08 03:53] (current) – [entityframework (my beloved)] adam | ||
---|---|---|---|
Line 78: | Line 78: | ||
======= entityframework (my beloved) ======= | ======= entityframework (my beloved) ======= | ||
+ | |||
+ | install in your dev env: | ||
+ | |||
+ | dotnet tool install --global dotnet-ef | ||
install packages: | install packages: | ||
- | * Microsoft.EntityFrameworkCore.Design | + | |
- | * Npgsql.EntityFrameworkCore.PostgreSQL (or whatever you like) | + | * Npgsql.EntityFrameworkCore.PostgreSQL (or whatever you like) |
+ | |||
+ | dotnet-ef dbcontext scaffold " | ||
migrations: | migrations: | ||
- | | + | |
- | dotnet ef database update --connection " | + | dotnet ef database update --connection " |
- | + | ||
======= enum names ======= | ======= enum names ======= | ||
Line 175: | Line 182: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | src: https:// |