-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMiscellaneous.txt
More file actions
50 lines (31 loc) · 1.77 KB
/
Copy pathMiscellaneous.txt
File metadata and controls
50 lines (31 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
run command in project which:
have Program.cs
contains AddDbContext
typicaly:
TeamTaskTracking.Api
dotnet user-secrets init
dotnet user-secrets --project src/TeamTaskTracking.Api list
dotnet user-secrets set "ConnectionStrings:DefaultConnection" "Host=localhost;Port=5432;Database=teamtasktracking;Username=postgres;Password=xxxxxx"
=================================================
PostgreSQL Docker image 18+
docker run --name postgres -d -p 5432:5432 -e POSTGRES_PASSWORD=xxxxxx -v postgres_data:/var/lib/postgresql postgres
PostgreSQL Docker image 17-
docker run --name postgres -d -p 5432:5432 -e POSTGRES_PASSWORD=xxxxxxx -v postgres_data:/var/lib/postgresql/data postgres
\TaskTracking> dotnet ef migrations add Test --project TeamTaskTracking.Infrastructure --startup-project TeamTaskTracking.Api
\TaskTracking>dotnet ef migrations remove --project TeamTaskTracking.Infrastructure --startup-project TeamTaskTracking.Api
dotnet ef migrations add AddUsers --project TeamTaskTracking.Infrastructure --startup-project TeamTaskTracking.Api
dotnet ef database update --project TeamTaskTracking.Infrastructure --startup-project TeamTaskTracking.Api
dotnet ef migrations add AddProjectOwner --project src/TeamTaskTracking.Infrastructure --startup-project src/TeamTaskTracking.Api
dotnet ef database update --project src/TeamTaskTracking.Infrastructure --startup-project src/TeamTaskTracking.Api
Powershell-
[Convert]::ToBase64String((1..64 | ForEach-Object {Get-Random -Max 256}))
dotnet user-secrets init --project TeamTaskTracking.Api
dotnet user-secrets --project TeamTaskTracking.Api set "Jwt:SigningKey" "GENERATEDkEYfROMpREVIOUSsTEPpOWERSHELL"
{
"email": "john.doe@example.com",
"password": "StrongPassword123!"
}
{
"email": "tele@tele.com",
"password": "StrongPassword123!"
}